Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ParseTranspose.cxx
Go to the documentation of this file.
3#include "onnx_proto3.pb.h"
4
5namespace TMVA {
6namespace Experimental {
7namespace SOFIE {
8
9ParserFuncSignature ParseTranspose = [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
11
12 auto input_name = nodeproto.input(0);
15 } else {
16 throw std::runtime_error("TMVA::SOFIE ONNX Parser tranpose op has input tensor" + input_name +
17 " but its type is not yet registered");
18 }
19
20
21 std::string output_name = nodeproto.output(0);
22 std::vector<int_t> attr_perm;
23
24 if (nodeproto.attribute_size() == 1) {
25 attr_perm.assign(nodeproto.attribute(0).ints().begin(), nodeproto.attribute(0).ints().end());
26 }
27
28 auto op = std::make_unique<ROperator_Transpose>(attr_perm, nodeproto.input(0), nodeproto.output(0));
29
32 }
33
34 return op;
35};
36
37} // namespace SOFIE
38} // namespace Experimental
39} // namespace TMVA
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
const_iterator begin() const
const_iterator end() const
void RegisterTensorType(const std::string &, ETensorType)
ETensorType GetTensorType(const std::string &name)
std::function< std::unique_ptr< ROperator >(RModelParser_ONNX &, const onnx::NodeProto &)> ParserFuncSignature
ParserFuncSignature ParseTranspose
create variable transformations