ROOT
Version v6.32
master
v6.36
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
▼
inc
▼
TMVA
►
MethodPyAdaBoost.h
►
MethodPyGTB.h
►
MethodPyKeras.h
►
MethodPyRandomForest.h
►
MethodPyTorch.h
►
PyMethodBase.h
►
RModelParser_Keras.h
►
RModelParser_PyTorch.h
►
src
►
rmva
►
sofie
►
sofie_parsers
►
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
RModelParser_PyTorch.h
Go to the documentation of this file.
1
// @(#)root/tmva/pymva $Id$
2
// Author: Sanjiban Sengupta, 2021
3
4
/**********************************************************************************
5
* Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6
* Package: TMVA *
7
* *
8
* *
9
* Description: *
10
* Functionality for parsing a saved PyTorch .PT model into RModel object *
11
* *
12
* Authors (alphabetical): *
13
* Sanjiban Sengupta <sanjiban.sg@gmail.com> *
14
* *
15
* Copyright (c) 2021: *
16
* CERN, Switzerland *
17
* *
18
* *
19
* Redistribution and use in source and binary forms, with or without *
20
* modification, are permitted according to the terms listed in LICENSE *
21
* (see tmva/doc/LICENSE) *
22
**********************************************************************************/
23
24
25
#ifndef TMVA_SOFIE_RMODELPARSER_PYTORCH
26
#define TMVA_SOFIE_RMODELPARSER_PYTORCH
27
28
#include "
TMVA/RModel.hxx
"
29
#include "
TMVA/SOFIE_common.hxx
"
30
#include "
TMVA/Types.h
"
31
#include "
TMVA/OperatorList.hxx
"
32
33
#include "
TMVA/PyMethodBase.h
"
34
35
#include "
Rtypes.h
"
36
#include "
TString.h
"
37
38
39
namespace
TMVA
{
40
namespace
Experimental{
41
namespace
SOFIE{
42
namespace
PyTorch{
43
44
/// Parser function for translating PyTorch .pt model into a RModel object.
45
/// Accepts the file location of a PyTorch model, shapes and data-types of input tensors
46
/// and returns the equivalent RModel object.
47
RModel
Parse
(std::string
filepath
,std::vector<std::vector<size_t>>
inputShapes
, std::vector<ETensorType>
dtype
);
48
49
/// Overloaded Parser function for translating PyTorch .pt model into a RModel object.
50
/// Accepts the file location of a PyTorch model and the shapes of input tensors.
51
/// Builds the vector of data-types for input tensors and calls the `Parse()` function to
52
/// return the equivalent RModel object.
53
RModel
Parse
(std::string
filepath
,std::vector<std::vector<size_t>>
inputShapes
);
54
55
}
//PyTorch
56
}
//SOFIE
57
}
//Experimental
58
}
//TMVA
59
60
#endif
//TMVA_PYMVA_RMODELPARSER_PYTORCH
OperatorList.hxx
PyMethodBase.h
RModel.hxx
Rtypes.h
SOFIE_common.hxx
TString.h
ROOT::Detail::TRangeCast
Definition
TCollection.h:311
TMVA::Experimental::SOFIE::RModel
Definition
RModel.hxx:12
TMVA::Experimental::SOFIE::PyTorch::Parse
RModel Parse(std::string filepath, std::vector< std::vector< size_t > > inputShapes, std::vector< ETensorType > dtype)
Parser function for translating PyTorch .pt model into a RModel object.
Definition
RModelParser_PyTorch.cxx:357
TMVA
create variable transformations
Definition
GeneticMinimizer.h:22
Types.h
tmva
pymva
inc
TMVA
RModelParser_PyTorch.h
ROOT v6-32 - Reference Guide Generated on Mon Apr 28 2025 05:42:13 (GVA Time) using Doxygen 1.10.0