13 auto input_name = batchnormnode.input(0);
17 throw std::runtime_error(
"TMVA::SOFIE ONNX Parser BatchNorm op has input tensor " + input_name +
18 " but its type is not yet registered");
21 std::unique_ptr<ROperator> op;
22 std::string output_name = relunode.output(0);
23 float fepsilon = 1
e-05;
24 float fmomentum = 0.9;
25 std::size_t ftraining_mode = 0;
26 for (
int_t i = 0; i < batchnormnode.attribute_size(); i++) {
27 const std::string &attribute_name = batchnormnode.attribute(i).name();
28 if (attribute_name ==
"epsilon")
29 fepsilon = batchnormnode.attribute(i).f();
30 else if (attribute_name ==
"momentum")
31 fmomentum = batchnormnode.attribute(i).f();
36 if (batchnormnode.input_size() == 5) {
38 batchnormnode.input(1), batchnormnode.input(2), batchnormnode.input(3),
43 throw std::runtime_error(
"TMVA::SOFIE - Unsupported - Operator BatchNorm does not yet support input type " +
44 std::to_string(
static_cast<int>(input_type)));