diff --git a/include/ml.hxx b/include/ml.hxx index 0e625233..97bbb567 100644 --- a/include/ml.hxx +++ b/include/ml.hxx @@ -38,6 +38,9 @@ namespace sofie { const std::string &outputname, const std::string &modelFilePath); + // ROOT::RDF::RNode ONNXEvaluate(ROOT::RDF::RNode df, const std::vector &input_vec, + // const std::string &outputname, + // const std::string &modelFilePath); } // end namespace sofie diff --git a/src/ml.cxx b/src/ml.cxx index d7f25454..22d69675 100644 --- a/src/ml.cxx +++ b/src/ml.cxx @@ -14,6 +14,7 @@ #include "TMVA/RModel.hxx" #include "TMVA/RModelParser_Keras.h" #include "TMVA/RModelParser_PyTorch.h" +// #include "TMVA/RModelParser_ONNX.hxx" #include "TMVA/SOFIEHelpers.hxx" #include "TInterpreter.h" #include "TSystem.h" @@ -229,6 +230,29 @@ ROOT::RDF::RNode PyTorchEvaluate(ROOT::RDF::RNode df, } +// ROOT::RDF::RNode ONNXEvaluate(ROOT::RDF::RNode df, +// const std::vector &input_vec, +// const std::string &outputname, +// const std::string &modelFilePath) { + + +// bool verboseParser = false; + +// Logger::get("ONNXEvaluate") +// ->debug("loading model file {} ...", modelFilePath); +// TMVA::Experimental::SOFIE::RModelParser_ONNX parser; +// TMVA::Experimental::SOFIE::RModel model = parser.Parse(modelFilePath, verboseParser); +// Logger::get("ONNXEvaluate") +// ->debug("finished loading model"); + +// auto df2 = df.Define(outputname, SOFIEGenerator(input_vec, model, modelFilePath)); + +// return df2; + +// } + + + } // end namespace sofie } // end namespace ml #endif /* GUARD_ML_H */