PySpikingHandlerModel¶
Full Name
neuroptimiser.core.models.PySpikingHandlerModel
Description
- class PySpikingHandlerModel[source]¶
Bases:
PyLoihiProcessModel
Spiking handler model for Loihi-based perturbation-based nheuristics
This model handles the spiking signals in a nheuristic process, allowing the spiking core read and write spikes to the input and output ports to the external world.
See also
neuroptimiser.core.processes.SpikingHandler
Process that handles spiking signals in a NeuroHeuristicUnit.
- __init__(proc_params)[source]¶
Initialises the spiking handler model with the given parameters.
- Arguments
- proc_paramsdict
- Dictionary containing the parameters for the process model. It must include:
agent_id
: int, identifier of the agentinternal_shape
: tuple, shape of the internal state (e.g., number of dimensions)external_shape
: tuple, shape of the external state (e.g., number of agents and dimensions)
- a_in: PyInPort = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyInPortVectorDense'>, d_type=<class 'bool'>, precision=None)¶
- a_out: PyOutPort = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'bool'>, precision=None)¶
- implements_process¶
alias of
SpikingHandler
- implements_protocol¶
alias of
LoihiProtocol
- required_resources: ty.List[ty.Type[AbstractResource]] = [<class 'lava.magma.core.resources.CPU'>]¶
- run_spk()[source]¶
Runs the spiking handler process model.
- The process is summarised as follows:
Receives the input spikes and activation matrix from the inports.
Prepares the output spikes based on the input spikes and sends them to the outports.
- s_in: PyInPort = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyInPortVectorDense'>, d_type=<class 'bool'>, precision=None)¶
- s_out: PyOutPort = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'bool'>, precision=None)¶