Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TMVA::Experimental::SOFIE Namespace Reference

Namespaces

namespace  BLAS
 
namespace  PyKeras
 
namespace  PyTorch
 
namespace  UTILITY
 

Classes

struct  BinaryOperatorTrait
 
struct  BinaryOperatorTrait< T, Add >
 
struct  BinaryOperatorTrait< T, Div >
 
struct  BinaryOperatorTrait< T, Mul >
 
struct  BinaryOperatorTrait< T, Pow >
 
struct  BinaryOperatorTrait< T, Sub >
 
struct  Dim
 
struct  InitializedTensor
 
struct  InputTensorInfo
 
struct  NaryOperatorTraits
 
struct  NaryOperatorTraits< float, EBasicNaryOperator::Mean >
 
struct  NaryOperatorTraits< T, EBasicNaryOperator::Max >
 
struct  NaryOperatorTraits< T, EBasicNaryOperator::Mean >
 
struct  NaryOperatorTraits< T, EBasicNaryOperator::Min >
 
struct  NaryOperatorTraits< T, EBasicNaryOperator::Sum >
 
struct  RAttributes_Pool
 
class  RModel
 
class  RModelParser_ONNX
 
class  ROperator
 
class  ROperator_BasicBinary
 
class  ROperator_BasicNary
 
class  ROperator_BasicUnary
 
class  ROperator_BatchNormalization
 
class  ROperator_Cast
 
class  ROperator_Concat
 
class  ROperator_Conv
 
class  ROperator_ConvTranspose
 Transposed Convolution operator. More...
 
class  ROperator_Custom
 
class  ROperator_Expand
 
class  ROperator_Gather
 
class  ROperator_Gemm
 
class  ROperator_GRU
 Gated Recurrent Unit operator. More...
 
class  ROperator_Identity
 
class  ROperator_LayerNormalization
 
class  ROperator_LeakyRelu
 
class  ROperator_LSTM
 Long Short-Term Memory operator. More...
 
class  ROperator_Pool
 
class  ROperator_Reduce
 
class  ROperator_Relu
 
class  ROperator_Reshape
 
class  ROperator_RNN
 Recurrent Neural Network operator. More...
 
class  ROperator_Selu
 
class  ROperator_Shape
 
class  ROperator_Sigmoid
 
class  ROperator_Slice
 
class  ROperator_Softmax
 
class  ROperator_Tanh
 
class  ROperator_Transpose
 
struct  TensorInfo
 
struct  UnaryOpTraits
 
struct  UnaryOpTraits< T, EBasicUnaryOperator::kExp >
 
struct  UnaryOpTraits< T, EBasicUnaryOperator::kNeg >
 
struct  UnaryOpTraits< T, EBasicUnaryOperator::kReciprocal >
 
struct  UnaryOpTraits< T, EBasicUnaryOperator::kSqrt >
 

Typedefs

typedef std::int64_t int_t
 
using ParserFuncSignature = std::function< std::unique_ptr< ROperator >(RModelParser_ONNX &, const onnx::NodeProto &)>
 
using ParserFuseFuncSignature = std::function< std::unique_ptr< ROperator >(RModelParser_ONNX &, const onnx::NodeProto &, const onnx::NodeProto &)>
 

Enumerations

enum  EBasicBinaryOperator {
  Add , Sub , Mul , Div ,
  Pow
}
 
enum class  EBasicNaryOperator { Max , Min , Mean , Sum }
 
enum class  EBasicUnaryOperator { kReciprocal , kSqrt , kNeg , kExp }
 
enum  EReduceOpMode { ReduceMean , ReduceSumsquare , ReduceProd , InvalidReduceOp }
 
enum class  ETensorType {
  UNDEFINED = 0 , FLOAT = 1 , UNINT8 = 2 , INT8 = 3 ,
  UINT16 = 4 , INT16 = 5 , INT32 = 6 , INT64 = 7 ,
  STRING = 8 , BOOL = 9 , FLOAT16 = 10 , DOUBLE = 11 ,
  UINT32 = 12 , UINT64 = 13 , COMPLEX64 = 14 , COMPLEX28 = 15 ,
  BFLOAT16 = 16
}
 
enum class  Options { kDefault = 0x0 , kNoSession = 0x1 , kNoWeightFile = 0x2 }
 
enum  PoolOpMode { InvalidPool , MaxPool , AveragePool , GlobalAveragePool }
 
enum  ReshapeOpMode { Reshape , Flatten , Squeeze , Unsqueeze }
 

Functions

std::vector< DimConvertShapeToDim (std::vector< size_t > shape)
 
std::size_t ConvertShapeToLength (std::vector< size_t > shape)
 
std::string ConvertShapeToString (std::vector< size_t > shape)
 
ETensorType ConvertStringToType (std::string type)
 
std::string ConvertTypeToString (ETensorType type)
 
template<typename T >
ETensorType GetTemplatedType (T)
 
std::underlying_type_t< Optionsoperator| (Options opA, Options opB)
 
std::underlying_type_t< Optionsoperator| (std::underlying_type_t< Options > opA, Options opB)
 
template<EBasicBinaryOperator Op>
std::unique_ptr< ROperatorParseBasicBinary (RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
 
template<EBasicNaryOperator Op>
std::unique_ptr< ROperatorParseBasicNary (RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
 
template<EBasicUnaryOperator Op>
std::unique_ptr< ROperatorParseBasicUnary (RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
 
template<EReduceOpMode Op>
std::unique_ptr< ROperatorParseReduce (RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto)
 

Variables

ParserFuncSignature ParseAdd
 
ParserFuncSignature ParseBatchNormalization
 
ParserFuncSignature ParseCast
 
ParserFuncSignature ParseConcat
 
ParserFuncSignature ParseConv
 
ParserFuncSignature ParseConvTranspose
 
ParserFuncSignature ParseDiv
 
ParserFuncSignature ParseExp
 
ParserFuncSignature ParseExpand
 
ParserFuseFuncSignature ParseFuseConvAdd
 
ParserFuseFuncSignature ParseFuseConvTransposeAdd
 
ParserFuseFuncSignature ParseFuseMatMulAdd
 
ParserFuncSignature ParseGather
 
ParserFuncSignature ParseGemm
 
ParserFuncSignature ParseGRU
 
ParserFuncSignature ParseIdentity
 
ParserFuncSignature ParseLayerNormalization
 
ParserFuncSignature ParseLeakyRelu
 
ParserFuncSignature ParseLSTM
 
ParserFuncSignature ParseMax
 
ParserFuncSignature ParseMean
 
ParserFuncSignature ParseMin
 
ParserFuncSignature ParseMul
 
ParserFuncSignature ParseNeg
 
ParserFuncSignature ParsePool
 
ParserFuncSignature ParsePow
 
ParserFuncSignature ParseReciprocal
 
ParserFuncSignature ParseReduceMean
 
ParserFuncSignature ParseReduceProd
 
ParserFuncSignature ParseReduceSumsquare
 
ParserFuncSignature ParseRelu
 
ParserFuncSignature ParseReshape
 
ParserFuncSignature ParseRNN
 
ParserFuncSignature ParseSelu
 
ParserFuncSignature ParseShape
 
ParserFuncSignature ParseSigmoid
 
ParserFuncSignature ParseSlice
 
ParserFuncSignature ParseSoftmax
 
ParserFuncSignature ParseSqrt
 
ParserFuncSignature ParseSub
 
ParserFuncSignature ParseSum
 
ParserFuncSignature ParseTanh
 
ParserFuncSignature ParseTranspose
 

Typedef Documentation

◆ int_t

typedef std::int64_t TMVA::Experimental::SOFIE::int_t

Definition at line 29 of file SOFIE_common.hxx.

◆ ParserFuncSignature

using TMVA::Experimental::SOFIE::ParserFuncSignature = typedef std::function<std::unique_ptr<ROperator>(RModelParser_ONNX & , const onnx::NodeProto & )>

Definition at line 22 of file RModelParser_ONNX.hxx.

◆ ParserFuseFuncSignature

using TMVA::Experimental::SOFIE::ParserFuseFuncSignature = typedef std::function<std::unique_ptr<ROperator> (RModelParser_ONNX& , const onnx::NodeProto& , const onnx::NodeProto& )>

Definition at line 24 of file RModelParser_ONNX.hxx.

Enumeration Type Documentation

◆ EBasicBinaryOperator

Enumerator
Add 
Sub 
Mul 
Div 
Pow 

Definition at line 14 of file ROperator_BasicBinary.hxx.

◆ EBasicNaryOperator

Enumerator
Max 
Min 
Mean 
Sum 

Definition at line 16 of file ROperator_BasicNary.hxx.

◆ EBasicUnaryOperator

Enumerator
kReciprocal 
kSqrt 
kNeg 
kExp 

Definition at line 12 of file ROperator_BasicUnary.hxx.

◆ EReduceOpMode

Enumerator
ReduceMean 
ReduceSumsquare 
ReduceProd 
InvalidReduceOp 

Definition at line 19 of file ROperator_Reduce.hxx.

◆ ETensorType

Enumerator
UNDEFINED 
FLOAT 
UNINT8 
INT8 
UINT16 
INT16 
INT32 
INT64 
STRING 
BOOL 
FLOAT16 
DOUBLE 
UINT32 
UINT64 
COMPLEX64 
COMPLEX28 
BFLOAT16 

Definition at line 24 of file SOFIE_common.hxx.

◆ Options

Enumerator
kDefault 
kNoSession 
kNoWeightFile 

Definition at line 23 of file RModel.hxx.

◆ PoolOpMode

Enumerator
InvalidPool 
MaxPool 
AveragePool 
GlobalAveragePool 

Definition at line 31 of file ROperator_Pool.hxx.

◆ ReshapeOpMode

Enumerator
Reshape 
Flatten 
Squeeze 
Unsqueeze 

Definition at line 15 of file ROperator_Reshape.hxx.

Function Documentation

◆ ConvertShapeToDim()

std::vector< Dim > TMVA::Experimental::SOFIE::ConvertShapeToDim ( std::vector< size_t >  shape)

Definition at line 11 of file SOFIE_common.cxx.

◆ ConvertShapeToLength()

std::size_t TMVA::Experimental::SOFIE::ConvertShapeToLength ( std::vector< size_t >  shape)

Definition at line 19 of file SOFIE_common.cxx.

◆ ConvertShapeToString()

std::string TMVA::Experimental::SOFIE::ConvertShapeToString ( std::vector< size_t >  shape)

Definition at line 73 of file SOFIE_common.cxx.

◆ ConvertStringToType()

ETensorType TMVA::Experimental::SOFIE::ConvertStringToType ( std::string  type)

Definition at line 58 of file SOFIE_common.cxx.

◆ ConvertTypeToString()

std::string TMVA::Experimental::SOFIE::ConvertTypeToString ( ETensorType  type)

Definition at line 26 of file SOFIE_common.cxx.

◆ GetTemplatedType()

template<typename T >
ETensorType TMVA::Experimental::SOFIE::GetTemplatedType ( )

Definition at line 113 of file SOFIE_common.hxx.

◆ operator|() [1/2]

std::underlying_type_t< Options > TMVA::Experimental::SOFIE::operator| ( Options  opA,
Options  opB 
)

Definition at line 15 of file RModel.cxx.

◆ operator|() [2/2]

std::underlying_type_t< Options > TMVA::Experimental::SOFIE::operator| ( std::underlying_type_t< Options opA,
Options  opB 
)

Definition at line 18 of file RModel.cxx.

◆ ParseBasicBinary()

template<EBasicBinaryOperator Op>
std::unique_ptr< ROperator > TMVA::Experimental::SOFIE::ParseBasicBinary ( RModelParser_ONNX parser,
const onnx::NodeProto &  nodeproto 
)

Definition at line 10 of file ParseBasicBinary.cxx.

◆ ParseBasicNary()

template<EBasicNaryOperator Op>
std::unique_ptr< ROperator > TMVA::Experimental::SOFIE::ParseBasicNary ( RModelParser_ONNX parser,
const onnx::NodeProto &  nodeproto 
)

Definition at line 11 of file ParseBasicNary.cxx.

◆ ParseBasicUnary()

template<EBasicUnaryOperator Op>
std::unique_ptr< ROperator > TMVA::Experimental::SOFIE::ParseBasicUnary ( RModelParser_ONNX parser,
const onnx::NodeProto &  nodeproto 
)

Definition at line 10 of file ParseBasicUnary.cxx.

◆ ParseReduce()

template<EReduceOpMode Op>
std::unique_ptr< ROperator > TMVA::Experimental::SOFIE::ParseReduce ( RModelParser_ONNX parser,
const onnx::NodeProto &  nodeproto 
)

Definition at line 11 of file ParseReduce.cxx.

Variable Documentation

◆ ParseAdd

ParserFuncSignature TMVA::Experimental::SOFIE::ParseAdd
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Add>(parser, nodeproto);
}

Definition at line 52 of file ParseBasicBinary.cxx.

◆ ParseBatchNormalization

ParserFuncSignature TMVA::Experimental::SOFIE::ParseBatchNormalization

Definition at line 9 of file ParseBatchNormalization.cxx.

◆ ParseCast

ParserFuncSignature TMVA::Experimental::SOFIE::ParseCast

Definition at line 9 of file ParseCast.cxx.

◆ ParseConcat

ParserFuncSignature TMVA::Experimental::SOFIE::ParseConcat

Definition at line 9 of file ParseConcat.cxx.

◆ ParseConv

ParserFuncSignature TMVA::Experimental::SOFIE::ParseConv

Definition at line 9 of file ParseConv.cxx.

◆ ParseConvTranspose

ParserFuncSignature TMVA::Experimental::SOFIE::ParseConvTranspose

Definition at line 9 of file ParseConvTranspose.cxx.

◆ ParseDiv

ParserFuncSignature TMVA::Experimental::SOFIE::ParseDiv
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Div>(parser, nodeproto);
}

Definition at line 67 of file ParseBasicBinary.cxx.

◆ ParseExp

ParserFuncSignature TMVA::Experimental::SOFIE::ParseExp
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicUnary<EBasicUnaryOperator::kExp>(parser, nodeproto);
}

Definition at line 59 of file ParseBasicUnary.cxx.

◆ ParseExpand

ParserFuncSignature TMVA::Experimental::SOFIE::ParseExpand

Definition at line 9 of file ParseExpand.cxx.

◆ ParseFuseConvAdd

ParserFuseFuncSignature TMVA::Experimental::SOFIE::ParseFuseConvAdd
Initial value:
= [](RModelParser_ONNX & , const onnx::NodeProto & ,
const onnx::NodeProto & ) {
std::unique_ptr<ROperator> op;
return op;
}

Definition at line 9 of file ParseFuseConvAdd.cxx.

◆ ParseFuseConvTransposeAdd

ParserFuseFuncSignature TMVA::Experimental::SOFIE::ParseFuseConvTransposeAdd

Definition at line 9 of file ParseFuseConvTransposeAdd.cxx.

◆ ParseFuseMatMulAdd

ParserFuseFuncSignature TMVA::Experimental::SOFIE::ParseFuseMatMulAdd

Definition at line 9 of file ParseFuseMatMulAdd.cxx.

◆ ParseGather

ParserFuncSignature TMVA::Experimental::SOFIE::ParseGather

Definition at line 10 of file ParseGather.cxx.

◆ ParseGemm

ParserFuncSignature TMVA::Experimental::SOFIE::ParseGemm

Definition at line 9 of file ParseGemm.cxx.

◆ ParseGRU

ParserFuncSignature TMVA::Experimental::SOFIE::ParseGRU

Definition at line 9 of file ParseGRU.cxx.

◆ ParseIdentity

ParserFuncSignature TMVA::Experimental::SOFIE::ParseIdentity
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type = ETensorType::UNDEFINED;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Identity op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Identity<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Identity does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseIdentity.cxx.

◆ ParseLayerNormalization

ParserFuncSignature TMVA::Experimental::SOFIE::ParseLayerNormalization

Definition at line 9 of file ParseLayerNormalization.cxx.

◆ ParseLeakyRelu

ParserFuncSignature TMVA::Experimental::SOFIE::ParseLeakyRelu

Definition at line 9 of file ParseLeakyRelu.cxx.

◆ ParseLSTM

ParserFuncSignature TMVA::Experimental::SOFIE::ParseLSTM

Definition at line 9 of file ParseLSTM.cxx.

◆ ParseMax

ParserFuncSignature TMVA::Experimental::SOFIE::ParseMax
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicNary<EBasicNaryOperator::Max>(parser, nodeproto);
}

Definition at line 47 of file ParseBasicNary.cxx.

◆ ParseMean

ParserFuncSignature TMVA::Experimental::SOFIE::ParseMean
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicNary<EBasicNaryOperator::Mean>(parser, nodeproto);
}

Definition at line 55 of file ParseBasicNary.cxx.

◆ ParseMin

ParserFuncSignature TMVA::Experimental::SOFIE::ParseMin
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicNary<EBasicNaryOperator::Min>(parser, nodeproto);
}

Definition at line 51 of file ParseBasicNary.cxx.

◆ ParseMul

ParserFuncSignature TMVA::Experimental::SOFIE::ParseMul
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Mul>(parser, nodeproto);
}

Definition at line 62 of file ParseBasicBinary.cxx.

◆ ParseNeg

ParserFuncSignature TMVA::Experimental::SOFIE::ParseNeg
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicUnary<EBasicUnaryOperator::kNeg>(parser, nodeproto);
}

Definition at line 54 of file ParseBasicUnary.cxx.

◆ ParsePool

ParserFuncSignature TMVA::Experimental::SOFIE::ParsePool

Definition at line 9 of file ParsePool.cxx.

◆ ParsePow

ParserFuncSignature TMVA::Experimental::SOFIE::ParsePow
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Pow>(parser, nodeproto);
}

Definition at line 72 of file ParseBasicBinary.cxx.

◆ ParseReciprocal

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReciprocal
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicUnary<EBasicUnaryOperator::kReciprocal>(parser, nodeproto);
}

Definition at line 49 of file ParseBasicUnary.cxx.

◆ ParseReduceMean

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReduceMean
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseReduce<EReduceOpMode::ReduceMean>(parser, nodeproto);
}

Definition at line 63 of file ParseReduce.cxx.

◆ ParseReduceProd

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReduceProd
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseReduce<EReduceOpMode::ReduceProd>(parser, nodeproto);
}

Definition at line 73 of file ParseReduce.cxx.

◆ ParseReduceSumsquare

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReduceSumsquare
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseReduce<EReduceOpMode::ReduceSumsquare>(parser, nodeproto);
}

Definition at line 68 of file ParseReduce.cxx.

◆ ParseRelu

ParserFuncSignature TMVA::Experimental::SOFIE::ParseRelu
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser relu op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Relu<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Relu does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseRelu.cxx.

◆ ParseReshape

ParserFuncSignature TMVA::Experimental::SOFIE::ParseReshape

Definition at line 9 of file ParseReshape.cxx.

◆ ParseRNN

ParserFuncSignature TMVA::Experimental::SOFIE::ParseRNN

Definition at line 9 of file ParseRNN.cxx.

◆ ParseSelu

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSelu
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type = ETensorType::UNDEFINED;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser selu op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Selu<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Selu does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseSelu.cxx.

◆ ParseShape

ParserFuncSignature TMVA::Experimental::SOFIE::ParseShape

Definition at line 9 of file ParseShape.cxx.

◆ ParseSigmoid

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSigmoid
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Sigmoid op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Sigmoid<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Sigmoid does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseSigmoid.cxx.

◆ ParseSlice

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSlice

Definition at line 9 of file ParseSlice.cxx.

◆ ParseSoftmax

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSoftmax
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Softmax op has input tensor " + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
int64_t attr_axis = -1;
if (nodeproto.attribute_size() == 1 && nodeproto.attribute(0).name() == "axis")
attr_axis = nodeproto.attribute(0).i();
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Softmax<float>(attr_axis, input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Softmax does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseSoftmax.cxx.

◆ ParseSqrt

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSqrt
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicUnary<EBasicUnaryOperator::kSqrt>(parser, nodeproto);
}

Definition at line 44 of file ParseBasicUnary.cxx.

◆ ParseSub

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSub
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicBinary<EBasicBinaryOperator::Sub>(parser, nodeproto);
}

Definition at line 57 of file ParseBasicBinary.cxx.

◆ ParseSum

ParserFuncSignature TMVA::Experimental::SOFIE::ParseSum
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
return ParseBasicNary<EBasicNaryOperator::Sum>(parser, nodeproto);
}

Definition at line 59 of file ParseBasicNary.cxx.

◆ ParseTanh

ParserFuncSignature TMVA::Experimental::SOFIE::ParseTanh
Initial value:
= [](RModelParser_ONNX &parser, const onnx::NodeProto &nodeproto) {
ETensorType input_type;
auto input_name = nodeproto.input(0);
if (parser.IsRegisteredTensorType(input_name)) {
input_type = parser.GetTensorType(input_name);
} else {
throw std::runtime_error("TMVA::SOFIE ONNX Parser Tanh op has input tensor" + input_name +
" but its type is not yet registered");
}
std::unique_ptr<ROperator> op;
std::string output_name = nodeproto.output(0);
switch (input_type) {
case ETensorType::FLOAT: op.reset(new ROperator_Tanh<float>(input_name, output_name)); break;
default:
throw std::runtime_error("TMVA::SOFIE - Unsupported - Operator Tanh does not yet support input type " +
std::to_string(static_cast<int>(input_type)));
}
if (!parser.IsRegisteredTensorType(output_name)) {
parser.RegisterTensorType(output_name, input_type);
}
return op;
}

Definition at line 9 of file ParseTanh.cxx.

◆ ParseTranspose

ParserFuncSignature TMVA::Experimental::SOFIE::ParseTranspose

Definition at line 9 of file ParseTranspose.cxx.