Belle II Software development
TrivialModel Class Reference
Inheritance diagram for TrivialModel:

Public Member Functions

 __init__ (self, forward_fn)
 
 forward (self, *args)
 

Public Attributes

 forward_fn = forward_fn
 forward pass function
 

Detailed Description

Wrapper class to create simple non-parametric models with multiple inputs and outputs for ONNX tests

Definition at line 40 of file write_test_files.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
forward_fn )
Initialize with forward pass function passed to the constructor

Definition at line 45 of file write_test_files.py.

45 def __init__(self, forward_fn):
46 """
47 Initialize with forward pass function passed to the constructor
48 """
49 super().__init__()
50
51
52 self.forward_fn = forward_fn
53

Member Function Documentation

◆ forward()

forward ( self,
* args )
Run the forward pass based on `forward_fn`

Definition at line 54 of file write_test_files.py.

54 def forward(self, *args):
55 """
56 Run the forward pass based on `forward_fn`
57 """
58 return self.forward_fn(*args)
59
60

Member Data Documentation

◆ forward_fn

forward_fn = forward_fn

forward pass function

Definition at line 52 of file write_test_files.py.


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