3#include "onnx_proto3.pb.h"
7namespace Experimental {
10template<EBasicNaryOperator Op>
13 std::vector<std::string> inputs;
14 size_t size = nodeproto.input_size();
16 for (
int i = 0; i < nodeproto.input_size(); ++i) {
17 auto input_name = nodeproto.input(i);
24 throw std::runtime_error(
"TMVA::SOFIE ONNX Parser Max op has input tensor" + input_name +
25 " but its type is not yet registered");
27 inputs.emplace_back(input_name);
30 std::unique_ptr<ROperator> op;
31 std::string output_name = nodeproto.output(0);
36 throw std::runtime_error(
"TMVA::SOFIE - Unsupported - Operator Max does not yet support input type " +
ConvertTypeToString(input_type));
48 return ParseBasicNary<EBasicNaryOperator::Max>(parser, nodeproto);
52 return ParseBasicNary<EBasicNaryOperator::Min>(parser, nodeproto);
56 return ParseBasicNary<EBasicNaryOperator::Mean>(parser, nodeproto);
60 return ParseBasicNary<EBasicNaryOperator::Sum>(parser, nodeproto);
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
bool IsRegisteredTensorType(const std::string &)
void RegisterTensorType(const std::string &, ETensorType)
ETensorType GetTensorType(const std::string &name)
ParserFuncSignature ParseMax
std::unique_ptr< ROperator > ParseBasicNary(RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
std::function< std::unique_ptr< ROperator >(RModelParser_ONNX &, const onnx::NodeProto &)> ParserFuncSignature
std::string ConvertTypeToString(ETensorType type)
ParserFuncSignature ParseMean
ParserFuncSignature ParseSum
ParserFuncSignature ParseMin
create variable transformations