superneuromat.SNN.simulate#
- SNN.simulate(time_steps: int = 1, callback=None, use=None, sparse=None, **kwargs) None[source]#
Simulate the neuromorphic spiking neural network
See
setup()and Considerations for Speed for guidance on choosing a backend and sparsity setting manually.- Parameters:
time_steps (int) – Number of time steps for which the neuromorphic circuit is to be simulated
callback (function, optional) – Function to be called after each time step, by default None
use (str, default=None) – Which backend to use. Can be ‘auto’, ‘cpu’, ‘jit’, or ‘gpu’. If None, SNN.backend will be used, which is ‘auto’ by default. ‘auto’ will choose a backend based on the network size and time steps.
sparse (bool | str | Any, default=None) – Whether to use a sparse representation for the SNN. See
sparsefor more information. This must be set toNoneif inmanual_setupmode.**kwargs (Any) – Additional keyword arguments to pass to the underlying setup functions.
- Raises:
TypeError – If
time_stepsis not an int.ValueError – If
time_stepsis less than or equal to zero.
See also
setup,recommend,recommend_sparsity,simulate_cpu,simulate_cpu_jit,simulate_gpu,devec,consume_input_spikesNotes
The backend recommendation in
manual_setupmode may be different because the backend depends on whether the SNN issparseor not, and the sparsity setting must be set insetup()BEFORE callingsimulate().