model.tools.generator.StateStorage#

class StateStorage(m: SNNCell)[source]#

Bases: Module

Class wrapper for neurons with a state of Norse. Saves the intermediate states of the stored neurons for further analysis.

Parameters:

m (SNNCell) – An initialized module with a state from the Norse library, which will be called with a direct passage

Methods

forward

Conveys the value to his module directly.

get_out

Returns the output of neurons for all time steps

get_state

Returns intermediate states of neurons

Attributes

training

forward(input_tensor: Tensor, state: Any | None = None)[source]#

Conveys the value to his module directly. If the network is in non -training mode, retains intermediate states

get_out() Tensor[source]#

Returns the output of neurons for all time steps

get_state() NamedTuple[source]#

Returns intermediate states of neurons