model.tools.generator.Storage#
- class Storage(auto_reset: bool = True)[source]#
Bases:
ModuleStores the forward pass values
- Parameters:
auto_reset (bool, optional) – If true, automatically clears the storage after the last call of the model generator. Set to False if you want the value to persist after a forward pass of the model. Defaults to True.
Methods
Adds information about the input tensor that the storage will expect
Adds one to the receive counter threshold
Store the input tensor and returns it back
Returns a list of saved tensors
Resets storage
Returns a list of channel values for the expected data
Attributes
training- add_input(channels: int) None[source]#
Adds information about the input tensor that the storage will expect
This is only necessary so that the generator can calculate the parameters for subsequent layers.
- Parameters:
channels (int) – Number of input tensor channels