Belle II Software light-2509-fornax
ONNXTeacher Class Reference

Teacher for the ONNX MVA method. More...

#include <ONNX.h>

Inheritance diagram for ONNXTeacher:
Collaboration diagram for ONNXTeacher:

Public Member Functions

 ONNXTeacher (const GeneralOptions &generalOptions, const ONNXOptions &onnxOptions)
 Constructs a new teacher using the GeneralOptions and specific options of this training.
 
virtual Weightfile train (Dataset &) const override
 Won't do any actual training, but will return a valid MVA Weightfile.
 

Protected Attributes

GeneralOptions m_general_options
 GeneralOptions containing all shared options.
 

Private Attributes

ONNXOptions m_specific_options
 Method specific options.
 

Detailed Description

Teacher for the ONNX MVA method.

Just there to satisfy the interface - doesn't do any training

Definition at line 420 of file ONNX.h.

Constructor & Destructor Documentation

◆ ONNXTeacher()

ONNXTeacher ( const GeneralOptions & generalOptions,
const ONNXOptions & onnxOptions )
inline

Constructs a new teacher using the GeneralOptions and specific options of this training.

Parameters
generalOptionsdefining all shared options
onnxOptionsdefining all method specific options

Definition at line 429 of file ONNX.h.

429 : Teacher(generalOptions),
430 m_specific_options(onnxOptions) {};

Member Function Documentation

◆ train()

Weightfile train ( Dataset & ) const
overridevirtual

Won't do any actual training, but will return a valid MVA Weightfile.

The Dataset parameter is required to adhere to the interface, but ignored.

Implements Teacher.

Definition at line 74 of file ONNX.cc.

75{
76 B2WARNING("The ONNX interface does not perform any training - "
77 "the train method just stores an existing ONNX model into an MVA weightfile.");
78 if (m_specific_options.m_modelFilename.empty()) {
79 B2FATAL("You have to provide a path to an ONNX model "
80 "via `m_modelFilename` in the specific options");
81 }
82 Weightfile weightfile;
83 weightfile.addOptions(m_general_options);
84 weightfile.addOptions(m_specific_options);
85 weightfile.addFile("ONNX_Modelfile", m_specific_options.m_modelFilename);
86 return weightfile;
87}
ONNXOptions m_specific_options
Method specific options.
Definition ONNX.h:440
GeneralOptions m_general_options
GeneralOptions containing all shared options.
Definition Teacher.h:49

Member Data Documentation

◆ m_general_options

GeneralOptions m_general_options
protectedinherited

GeneralOptions containing all shared options.

Definition at line 49 of file Teacher.h.

◆ m_specific_options

ONNXOptions m_specific_options
private

Method specific options.

Definition at line 440 of file ONNX.h.


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