10 auto input_name = nodeproto.input(0);
12 throw std::runtime_error(
"TMVA::SOFIE ONNX Parser ArgMax op has input tensor " + input_name +
13 " but its type is not yet registered");
17 int64_t attr_axis = 0;
18 int attr_keepdims = 1;
19 int attr_select_last_index = 0;
20 for (
int i = 0; i < nodeproto.attribute_size(); i++) {
21 const std::string &attribute_name = nodeproto.attribute(i).name();
22 if (attribute_name ==
"axis")
23 attr_axis = nodeproto.attribute(i).i();
24 else if (attribute_name ==
"keepdims")
25 attr_keepdims = nodeproto.attribute(i).i();
26 else if (attribute_name ==
"select_last_index")
27 attr_select_last_index = nodeproto.attribute(i).i();
30 std::string output_name = nodeproto.output(0);
31 std::unique_ptr<ROperator> op(
32 new ROperator_ArgMax(attr_axis, attr_keepdims, attr_select_last_index, input_name, output_name));