12 std::string input_name = nodeproto.input(0);
16 throw std::runtime_error(
"TMVA::SOFIE ONNX Parser Pad op has input tensor" + input_name +
17 " but its type is not yet registered");
20 if (nodeproto.input_size() < 2) {
21 throw std::runtime_error(
"TMVA::SOFIE ONNX Parser Pad op has invalid input size < 2");
25 std::string pads_name = nodeproto.input(1);
27 throw std::runtime_error(
"TMVA::SOFIE ONNX Parser Pad op has input tensor" + pads_name +
28 " but its type is not yet registered");
31 std::string cvalue_name;
32 if (nodeproto.input_size() > 2) {
33 cvalue_name = nodeproto.input(2);
35 std::string axes_name;
36 if (nodeproto.input_size() > 3) {
37 axes_name = nodeproto.input(3);
41 std::string mode =
"constant";
42 if (nodeproto.attribute_size() > 0 ) {
43 std::string attribute_name = nodeproto.attribute(0).name();
44 if (attribute_name ==
"mode") {
45 mode = nodeproto.attribute(0).s();
48 std::string output_name = nodeproto.output(0);
50 std::unique_ptr<ROperator> op;
53 op.reset(
new ROperator_Pad<float>(input_name, pads_name, cvalue_name, axes_name, output_name, mode));
56 throw std::runtime_error(
"TMVA::SOFIE - Unsupported - Operator Pad does not yet support input type " +
57 std::to_string(
static_cast<int>(input_type)));