lava.proc.sdn
lava.proc.sdn.models
digraph inheritancedf7a130e54 { bgcolor=transparent; rankdir=TB; size=""; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "AbstractDeltaModel" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.models.AbstractDeltaModel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "PyLoihiProcessModel" -> "AbstractDeltaModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AbstractProcessModel" [URL="../lava.magma.core.model.html#lava.magma.core.model.model.AbstractProcessModel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Represents a model that implements the behavior of a Process."]; "ABC" -> "AbstractProcessModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AbstractPyProcessModel" [URL="../lava.magma.core.model.py.html#lava.magma.core.model.py.model.AbstractPyProcessModel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract interface for Python ProcessModels."]; "AbstractProcessModel" -> "AbstractPyProcessModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "AbstractPyProcessModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AbstractSigmaDeltaModel" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.models.AbstractSigmaDeltaModel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "AbstractSigmaModel" -> "AbstractSigmaDeltaModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AbstractDeltaModel" -> "AbstractSigmaDeltaModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AbstractSigmaModel" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.models.AbstractSigmaModel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "PyLoihiProcessModel" -> "AbstractSigmaModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PyDeltaModelFixed" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.models.PyDeltaModelFixed",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Fixed point implementation of Delta encoding."]; "AbstractDeltaModel" -> "PyDeltaModelFixed" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PyDeltaModelFloat" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.models.PyDeltaModelFloat",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Floating point implementation of Delta encoding."]; "AbstractDeltaModel" -> "PyDeltaModelFloat" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PyLoihiProcessModel" [URL="../lava.magma.core.model.py.html#lava.magma.core.model.py.model.PyLoihiProcessModel",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="ProcessModel to simulate a Process on Loihi using CPU."]; "AbstractPyProcessModel" -> "PyLoihiProcessModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PySigmaDeltaModelFixed" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.models.PySigmaDeltaModelFixed",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Fixed point implementation of Sigma Delta neuron."]; "AbstractSigmaDeltaModel" -> "PySigmaDeltaModelFixed" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PySigmaDeltaModelFloat" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.models.PySigmaDeltaModelFloat",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Floating point implementation of Sigma Delta neuron."]; "AbstractSigmaDeltaModel" -> "PySigmaDeltaModelFloat" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PySigmaModelFixed" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.models.PySigmaModelFixed",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Fixed point implementation of Sigma decoding"]; "AbstractSigmaModel" -> "PySigmaModelFixed" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PySigmaModelFloat" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.models.PySigmaModelFloat",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Floating point implementation of Sigma decoding"]; "AbstractSigmaModel" -> "PySigmaModelFloat" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- class lava.proc.sdn.models.AbstractDeltaModel(proc_params=None)
Bases:
PyLoihiProcessModel
- a_in = None
- act = None
- cum_error = None
- delta_dynamics(act_data)
Delta encodind dynamics method
- Parameters:
act_data (np.ndarray) – data to be encoded
- Returns:
delta encoded data
- Return type:
np.ndarray
- error = None
- residue = None
- s_out = None
- spike_exp = None
- state_exp = None
- vth = None
- class lava.proc.sdn.models.AbstractSigmaDeltaModel(proc_params)
Bases:
AbstractSigmaModel
,AbstractDeltaModel
- a_in = None
- act = None
- activation_dynamics(sigma_data)
Sigma Delta activation dynamics. UNIT and RELU activations are supported.
- Parameters:
sigma_data (np.ndarray) – sigma decoded data
- Returns:
activation output
- Return type:
np.ndarray
- Raises:
NotImplementedError – if activation mode other than UNIT or RELU is encountered.
- bias = None
- cum_error = None
- dynamics(a_in_data)
- Return type:
ndarray
- error = None
- residue = None
- s_out = None
- sigma = None
- spike_exp = None
- state_exp = None
- vth = None
- class lava.proc.sdn.models.AbstractSigmaModel(proc_params=None)
Bases:
PyLoihiProcessModel
- a_in = None
- a_out = None
- run_spk()
Function that runs in Spiking Phase
- Return type:
None
- sigma = None
- sigma_dynamics(a_in_data)
Sigma decoding dynamics method
- Parameters:
a_in_data (np.ndarray) – Input data
- Returns:
decoded data
- Return type:
np.ndarray
- class lava.proc.sdn.models.PyDeltaModelFixed(proc_params=None)
Bases:
AbstractDeltaModel
Fixed point implementation of Delta encoding.
- a_in = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyInPortVectorDense'>, d_type=<class 'numpy.int32'>, precision=24)
-
act:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
-
cum_error:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'bool'>, precision=1)
-
error:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
- implements_protocol
alias of
LoihiProtocol
- required_resources: ty.List[ty.Type[AbstractResource]] = [<class 'lava.magma.core.resources.CPU'>]
-
residue:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
- run_spk()
Function that runs in Spiking Phase
- Return type:
None
- s_out = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'numpy.int32'>, precision=24)
-
sigma:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
-
spike_exp:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=3)
-
state_exp:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=3)
- tags: ty.List[str] = ['fixed_pt']
-
vth:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
- class lava.proc.sdn.models.PyDeltaModelFloat(proc_params=None)
Bases:
AbstractDeltaModel
Floating point implementation of Delta encoding.
- a_in = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyInPortVectorDense'>, d_type=<class 'float'>, precision=None)
-
act:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
-
cum_error:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'bool'>, precision=1)
-
error:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
- implements_protocol
alias of
LoihiProtocol
- required_resources: ty.List[ty.Type[AbstractResource]] = [<class 'lava.magma.core.resources.CPU'>]
-
residue:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
- run_spk()
Function that runs in Spiking Phase
- Return type:
None
- s_out = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'float'>, precision=None)
-
sigma:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
-
spike_exp:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=3)
-
state_exp:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=3)
- tags: ty.List[str] = ['floating_pt']
-
vth:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
- class lava.proc.sdn.models.PySigmaDeltaModelFixed(proc_params)
Bases:
AbstractSigmaDeltaModel
Fixed point implementation of Sigma Delta neuron.
- a_in = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyInPortVectorDense'>, d_type=<class 'numpy.int32'>, precision=24)
-
act:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
-
bias:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=16)
-
cum_error:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'bool'>, precision=1)
-
error:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
- implements_process
alias of
SigmaDelta
- implements_protocol
alias of
LoihiProtocol
- required_resources: ty.List[ty.Type[AbstractResource]] = [<class 'lava.magma.core.resources.CPU'>]
-
residue:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
- run_spk()
Function that runs in Spiking Phase
- Return type:
None
- s_out = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'numpy.int32'>, precision=24)
-
sigma:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
-
spike_exp:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=3)
-
state_exp:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=3)
- tags: ty.List[str] = ['fixed_pt']
-
vth:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
- class lava.proc.sdn.models.PySigmaDeltaModelFloat(proc_params)
Bases:
AbstractSigmaDeltaModel
Floating point implementation of Sigma Delta neuron.
- a_in = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyInPortVectorDense'>, d_type=<class 'float'>, precision=None)
-
act:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
-
bias:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
-
cum_error:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'bool'>, precision=1)
-
error:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
- implements_process
alias of
SigmaDelta
- implements_protocol
alias of
LoihiProtocol
- required_resources: ty.List[ty.Type[AbstractResource]] = [<class 'lava.magma.core.resources.CPU'>]
-
residue:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
- run_spk()
Function that runs in Spiking Phase
- Return type:
None
- s_out = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'float'>, precision=None)
-
sigma:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
-
spike_exp:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=3)
-
state_exp:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=3)
- tags: ty.List[str] = ['floating_pt']
-
vth:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
- class lava.proc.sdn.models.PySigmaModelFixed(proc_params=None)
Bases:
AbstractSigmaModel
Fixed point implementation of Sigma decoding
- a_in = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyInPortVectorDense'>, d_type=<class 'numpy.int32'>, precision=24)
- implements_protocol
alias of
LoihiProtocol
- required_resources: ty.List[ty.Type[AbstractResource]] = [<class 'lava.magma.core.resources.CPU'>]
- s_out = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'numpy.int32'>, precision=24)
-
sigma:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'numpy.int32'>, precision=24)
- tags: ty.List[str] = ['fixed_pt']
- class lava.proc.sdn.models.PySigmaModelFloat(proc_params=None)
Bases:
AbstractSigmaModel
Floating point implementation of Sigma decoding
- a_in = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyInPortVectorDense'>, d_type=<class 'float'>, precision=None)
- implements_protocol
alias of
LoihiProtocol
- required_resources: ty.List[ty.Type[AbstractResource]] = [<class 'lava.magma.core.resources.CPU'>]
- s_out = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'float'>, precision=None)
-
sigma:
ndarray
= LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
- tags: ty.List[str] = ['floating_pt']
- lava.proc.sdn.models.ReLU(x)
ReLU activation implementation
- Parameters:
x (np.ndarray) – input array
- Returns:
output array
- Return type:
np.ndarray
lava.proc.sdn.process
digraph inheritance78568b1eac { bgcolor=transparent; rankdir=TB; size=""; "AbstractProcess" [URL="../lava.magma.core.process.html#lava.magma.core.process.process.AbstractProcess",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="The notion of a Process is inspired by the Communicating Sequential"]; "ActivationMode" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.process.ActivationMode",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Enum for synapse sigma delta activation mode. Options are"]; "IntEnum" -> "ActivationMode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Delta" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.process.Delta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "AbstractProcess" -> "Delta" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Enum" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Generic enumeration."]; "IntEnum" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Enum where members are also (and must be) ints"]; "Enum" -> "IntEnum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Sigma" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.process.Sigma",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "AbstractProcess" -> "Sigma" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SigmaDelta" [URL="../lava/lava.proc.sdn.html#lava.proc.sdn.process.SigmaDelta",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "AbstractProcess" -> "SigmaDelta" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- class lava.proc.sdn.process.ActivationMode(value)
Bases:
IntEnum
Enum for synapse sigma delta activation mode. Options are UNIT: 0 RELU: 1
- RELU = 1
- UNIT = 0
- class lava.proc.sdn.process.Delta(*, shape, vth, cum_error=False, spike_exp=0, state_exp=0)
Bases:
AbstractProcess
- property shape: Tuple[int, ...]
Return shape of the Process.
- class lava.proc.sdn.process.Sigma(*, shape)
Bases:
AbstractProcess
- property shape: Tuple[int, ...]
Return shape of the Process.
- class lava.proc.sdn.process.SigmaDelta(*, shape, vth, bias=0, act_mode=ActivationMode.RELU, cum_error=False, spike_exp=0, state_exp=0, **kwargs)
Bases:
AbstractProcess
- property shape: Tuple[int, ...]
Return shape of the Process.