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

Public Member Functions

 __init__ (self, model=None, **kwargs)
 

Public Attributes

 model = model
 torch model
 
list collection_keys = []
 list of keys to save.
 

Detailed Description

torch state

Definition at line 20 of file torch.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
model = None,
** kwargs )
 Constructor of the state object 

Definition at line 25 of file torch.py.

25 def __init__(self, model=None, **kwargs):
26 """ Constructor of the state object """
27
28 self.model = model
29
30
31 self.collection_keys = []
32
33 # other possible things to save that are needed by the model
34 for key, value in kwargs.items():
35 self.collection_keys.append(key)
36 setattr(self, key, value)
37
38

Member Data Documentation

◆ collection_keys

list collection_keys = []

list of keys to save.

Any attribute in this collection is written to the weightfile and recovered during loading.

Definition at line 31 of file torch.py.

◆ model

model = model

torch model

Definition at line 28 of file torch.py.


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