17 if (nodeproto.op_type() ==
"ReduceMean")
19 else if (nodeproto.op_type() ==
"ReduceSumsquare")
21 else if (nodeproto.op_type() ==
"ReduceProd")
25 throw std::runtime_error(
"TN+MVA::SOFIE - Reduce op mode not supported.");
28 auto input_name = nodeproto.input(0);
32 throw std::runtime_error(
"TMVA::SOFIE ONNX Parser Reduce op has input tensor" + input_name +
33 " but its type is not yet registered");
36 std::unique_ptr<ROperator> op;
37 std::string output_name = nodeproto.output(0);
38 int attr_keepdims = 1;
40 for (
int_t i = 0;
i < nodeproto.attribute_size();
i++) {
41 std::string attribute_name = nodeproto.attribute(
i).name();
42 if (attribute_name ==
"keepdims")
43 attr_keepdims = nodeproto.attribute(
i).i();
44 if (attribute_name ==
"axis")
45 attr_axis = nodeproto.attribute(
i).i();
52 throw std::runtime_error(
"TMVA::SOFIE - Unsupported - Reduce Operator does not yet support input type " +
53 std::to_string(
static_cast<int>(input_type)));