Belle II Software light-2509-fornax
ONNXOptions Class Reference

Options for the ONNX MVA method. More...

#include <ONNX.h>

Inheritance diagram for ONNXOptions:
Collaboration diagram for ONNXOptions:

Public Member Functions

virtual void load (const boost::property_tree::ptree &) override
 Load mechanism to load Options from a xml tree.
 
virtual void save (boost::property_tree::ptree &) const override
 Save mechanism to store Options in a xml tree.
 
virtual po::options_description getDescription () override
 Returns a program options description for all available options.
 
virtual std::string getMethod () const override
 Return method name.
 

Public Attributes

std::string m_outputName
 Name of the output Tensor that is used to make predictions.
 
std::string m_modelFilename
 Filename of the model.
 

Detailed Description

Options for the ONNX MVA method.

Definition at line 374 of file ONNX.h.

Member Function Documentation

◆ getDescription()

virtual po::options_description getDescription ( )
inlineoverridevirtual

Returns a program options description for all available options.

Implements Options.

Definition at line 390 of file ONNX.h.

391 {
392 return po::options_description("ONNX options");
393 }

◆ getMethod()

virtual std::string getMethod ( ) const
inlineoverridevirtual

Return method name.

Implements SpecificOptions.

Definition at line 398 of file ONNX.h.

398{ return "ONNX"; }

◆ load()

void load ( const boost::property_tree::ptree & pt)
overridevirtual

Load mechanism to load Options from a xml tree.

Implements Options.

Definition at line 62 of file ONNX.cc.

63{
64 m_outputName = pt.get<std::string>("ONNX_outputName", "output");
65 m_modelFilename = pt.get<std::string>("ONNX_modelFilename", "model.onnx");
66}
std::string m_modelFilename
Filename of the model.
Definition ONNX.h:413
std::string m_outputName
Name of the output Tensor that is used to make predictions.
Definition ONNX.h:407

◆ save()

void save ( boost::property_tree::ptree & pt) const
overridevirtual

Save mechanism to store Options in a xml tree.

Implements Options.

Definition at line 68 of file ONNX.cc.

69{
70 pt.put("ONNX_outputName", m_outputName);
71 pt.put("ONNX_modelFilename", m_modelFilename);
72}

Member Data Documentation

◆ m_modelFilename

std::string m_modelFilename

Filename of the model.

Is used in ONNXTeacher::train as a path to the ONNX model to store in the weightfile.

Definition at line 413 of file ONNX.h.

◆ m_outputName

std::string m_outputName

Name of the output Tensor that is used to make predictions.

Only has to be provided if there are multiple outputs and none of them is called "output". In case of a single output, or if among multiple outputs there is one called "output", it will be used automatically.

Definition at line 407 of file ONNX.h.


The documentation for this class was generated from the following files: