Belle II Software light-2406-ragdoll
State Class Reference
Inheritance diagram for State:
Collaboration diagram for State:

Public Member Functions

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

Public Attributes

 model
 torch model
 
 collection_keys
 list of keys to save.
 

Detailed Description

torch state

Definition at line 18 of file torch.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 23 of file torch.py.

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

Member Data Documentation

◆ collection_keys

collection_keys

list of keys to save.

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

Definition at line 29 of file torch.py.

◆ model

model

torch model

Definition at line 26 of file torch.py.


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