PrefetchDelayAt#
- class brainstate.nn.PrefetchDelayAt(module, item, *time_and_index, delay_init=None, interpolation=None, update_every=None, **kwargs)[source]#
Provides access to a specific delayed state or variable value at the specific time.
This class represents the final step in the prefetch delay chain, providing actual access to state values at a specific delay time. It converts the specified time delay into steps and registers the delay with the appropriate StateWithDelay handler.
- Parameters:
Examples
>>> import brainpy >>> import brainstate >>> import brainunit as u >>> neuron = brainpy.state.LIF(10) >>> # Create a reference to voltage delayed by 5ms >>> delayed_v = PrefetchDelayAt(neuron, 'V', 5.0 * u.ms) >>> # Get the delayed value >>> v_value = delayed_v()