Skip to content

Commit 18a86f0

Browse files
harz05guitargeek
authored andcommitted
[tmva][sofie] throw on invalid BatchNormalization input count
1 parent e7d1511 commit 18a86f0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tmva/sofie_parsers/src/ParseBatchNormalization.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ ParserFuncSignature ParseBatchNormalization = [](RModelParser_ONNX &parser, cons
2929
op.reset(new ROperator_BatchNormalization<float>(fepsilon, fmomentum, ftraining_mode, nodeproto.input(0),
3030
nodeproto.input(1), nodeproto.input(2), nodeproto.input(3),
3131
nodeproto.input(4), output_name));
32+
} else {
33+
throw std::runtime_error("TMVA::SOFIE ONNX Parser BatchNormalization op requires exactly 5 inputs, got " +
34+
std::to_string(nodeproto.input_size()));
3235
}
3336
break;
3437
default:

0 commit comments

Comments
 (0)