3#include "onnx_proto3.pb.h"
6namespace Experimental {
10 auto input_name = nodeproto.input(0);
12 throw std::runtime_error(
"TMVA::SOFIE ONNX Parser Shape op has input tensor" + input_name +
13 " but its type is not yet registered");
16 std::unique_ptr<ROperator> op;
17 std::string output_name = nodeproto.output(0);
19 int attr_end = INT_MAX;
21 for (
int_t i = 0; i < nodeproto.attribute_size(); i++) {
22 std::string attribute_name = nodeproto.attribute(i).name();
23 if (attribute_name ==
"start")
24 attr_start = nodeproto.attribute(i).i();
25 if (attribute_name ==
"end")
26 attr_end = nodeproto.attribute(i).i();
29 op.reset(
new ROperator_Shape(attr_start, attr_end, input_name, output_name));
bool IsRegisteredTensorType(const std::string &)
void RegisterTensorType(const std::string &, ETensorType)
ParserFuncSignature ParseShape
std::function< std::unique_ptr< ROperator >(RModelParser_ONNX &, const onnx::NodeProto &)> ParserFuncSignature
create variable transformations