ROOT
Version v6.32
master
v6.34
v6.30
v6.28
v6.26
v6.24
v6.22
v6.20
v6.18
v6.16
v6.14
v6.12
v6.10
v6.08
v6.06
Reference Guide
▼
ROOT
ROOT Reference Documentation
Tutorials
►
Functional Parts
►
Namespaces
►
All Classes
▼
Files
▼
File List
►
bindings
►
core
►
documentation
►
geom
►
graf2d
►
graf3d
►
gui
►
hist
►
html
►
io
►
main
►
math
►
montecarlo
►
net
►
proof
►
roofit
►
sql
▼
tmva
doc
►
pymva
►
rmva
►
sofie
▼
sofie_parsers
►
inc
▼
src
►
ParseBasicBinary.cxx
►
ParseBasicNary.cxx
►
ParseBasicUnary.cxx
►
ParseBatchNormalization.cxx
►
ParseCast.cxx
►
ParseComparision.cxx
►
ParseConcat.cxx
►
ParseConv.cxx
►
ParseConvTranspose.cxx
►
ParseElu.cxx
►
ParseErf.cxx
►
ParseExpand.cxx
►
ParseEyeLike.cxx
►
ParseFuseConvAdd.cxx
►
ParseFuseConvTransposeAdd.cxx
►
ParseFuseMatMulAdd.cxx
►
ParseGather.cxx
►
ParseGemm.cxx
►
ParseGRU.cxx
►
ParseIdentity.cxx
►
ParseLayerNormalization.cxx
►
ParseLeakyRelu.cxx
►
ParseLSTM.cxx
►
ParseMatMul.cxx
►
ParsePool.cxx
►
ParseRange.cxx
►
ParseReduce.cxx
►
ParseRelu.cxx
►
ParseReshape.cxx
►
ParseRNN.cxx
►
ParseSelu.cxx
►
ParseShape.cxx
►
ParseSigmoid.cxx
►
ParseSlice.cxx
►
ParseSoftmax.cxx
►
ParseTanh.cxx
►
ParseTranspose.cxx
►
RModelParser_ONNX.cxx
►
tmva
►
tmvagui
►
tree
►
tutorials
►
v6-32-00-patches
►
File Members
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
ParseEyeLike.cxx
Go to the documentation of this file.
1
#include "
TMVA/RModelParser_ONNX.hxx
"
2
#include "
TMVA/ROperator_EyeLike.hxx
"
3
#include "onnx_proto3.pb.h"
4
5
namespace
TMVA
{
6
namespace
Experimental {
7
namespace
SOFIE {
8
9
ParserFuncSignature
ParseEyeLike
= [](
RModelParser_ONNX
&parser,
const
onnx::NodeProto &
nodeproto
) {
10
ETensorType
input_type
;
11
12
auto
input_name
=
nodeproto
.input(0);
13
if
(parser.
IsRegisteredTensorType
(
input_name
)) {
14
input_type
= parser.
GetTensorType
(
input_name
);
15
}
else
{
16
throw
std::runtime_error(
"TMVA::SOFIE ONNX Parser Eyelike op has input tensor"
+
input_name
+
17
" but its type is not yet registered"
);
18
}
19
20
std::unique_ptr<ROperator>
op
;
21
22
int
attr_dtype
= -1;
23
int
attr_k
= 0;
24
25
for
(
int_t
i = 0; i <
nodeproto
.attribute_size(); i++) {
26
std::string
attribute_name
=
nodeproto
.attribute(i).name();
27
if
(
attribute_name
==
"dtype"
)
28
attr_dtype
=
nodeproto
.attribute(i).i();
29
if
(
attribute_name
==
"k"
){
30
attr_k
=
nodeproto
.attribute(i).i();
31
}
32
}
33
if
(
attr_dtype
< 0)
34
attr_dtype
=
static_cast<
int
>
(
input_type
);
35
36
std::string
output_name
=
nodeproto
.output(0);
37
38
op
.reset(
new
ROperator_EyeLike
(
attr_dtype
,
attr_k
,
input_name
,
output_name
));
39
40
ETensorType
output_type
=
static_cast<
ETensorType
>
(
attr_dtype
);
41
42
if
(!parser.
IsRegisteredTensorType
(
output_name
)) {
43
parser.
RegisterTensorType
(
output_name
,
output_type
);
44
}
45
46
return
op
;
47
};
48
49
}
// namespace SOFIE
50
}
// namespace Experimental
51
}
// namespace TMVA
RModelParser_ONNX.hxx
ROperator_EyeLike.hxx
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TMVA::Experimental::SOFIE::RModelParser_ONNX
Definition
RModelParser_ONNX.hxx:27
TMVA::Experimental::SOFIE::RModelParser_ONNX::IsRegisteredTensorType
bool IsRegisteredTensorType(const std::string &)
Definition
RModelParser_ONNX.cxx:184
TMVA::Experimental::SOFIE::RModelParser_ONNX::RegisterTensorType
void RegisterTensorType(const std::string &, ETensorType)
Definition
RModelParser_ONNX.cxx:179
TMVA::Experimental::SOFIE::RModelParser_ONNX::GetTensorType
ETensorType GetTensorType(const std::string &name)
Definition
RModelParser_ONNX.cxx:189
TMVA::Experimental::SOFIE::ROperator_EyeLike
Definition
ROperator_EyeLike.hxx:15
TMVA::Experimental::SOFIE::ETensorType
ETensorType
Definition
SOFIE_common.hxx:25
TMVA::Experimental::SOFIE::ParserFuncSignature
std::function< std::unique_ptr< ROperator >(RModelParser_ONNX &, const onnx::NodeProto &)> ParserFuncSignature
Definition
RModelParser_ONNX.hxx:22
TMVA::Experimental::SOFIE::int_t
std::int64_t int_t
Definition
SOFIE_common.hxx:30
TMVA::Experimental::SOFIE::ParseEyeLike
ParserFuncSignature ParseEyeLike
Definition
ParseEyeLike.cxx:9
TMVA
create variable transformations
Definition
GeneticMinimizer.h:22
tmva
sofie_parsers
src
ParseEyeLike.cxx
ROOT v6-32 - Reference Guide Generated on Fri Apr 18 2025 05:42:56 (GVA Time) using Doxygen 1.10.0