lava.lib.dnf.inputs.gauss_pattern

lava.lib.dnf.inputs.gauss_pattern.models

digraph inheritance18748d29cb { 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"]; "AbstractProcessModel" [URL="../../lava/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/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)"]; "GaussPatternProcessModel" [URL="../lava-lib-dnf/lava.lib.dnf.inputs.gauss_pattern.html#lava.lib.dnf.inputs.gauss_pattern.models.GaussPatternProcessModel",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="PyLoihiProcessModel for GaussPatternProcess."]; "PyLoihiProcessModel" -> "GaussPatternProcessModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PyLoihiProcessModel" [URL="../../lava/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)"]; }
class lava.lib.dnf.inputs.gauss_pattern.models.GaussPatternProcessModel(proc_params=None)

Bases: PyLoihiProcessModel

PyLoihiProcessModel for GaussPatternProcess.

Implements the behavior of sending a gauss pattern asynchronously when a change is triggered.

a_out: PyOutPort = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'float'>, precision=None)
changed: ndarray = LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'bool'>, precision=None)
implements_process

alias of GaussPattern

implements_protocol

alias of LoihiProtocol

null_pattern: ndarray = LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
pattern: ndarray = LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'float'>, precision=None)
required_resources: ty.List[ty.Type[AbstractResource]] = [<class 'lava.magma.core.resources.CPU'>]
run_spk()

Function that runs in Spiking Phase

Return type:

None

lava.lib.dnf.inputs.gauss_pattern.process

digraph inheritance7efbf20fc5 { bgcolor=transparent; rankdir=TB; size=""; "AbstractProcess" [URL="../../lava/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"]; "GaussPattern" [URL="../lava-lib-dnf/lava.lib.dnf.inputs.gauss_pattern.html#lava.lib.dnf.inputs.gauss_pattern.process.GaussPattern",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="Gauss pattern generator Process."]; "AbstractProcess" -> "GaussPattern" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
class lava.lib.dnf.inputs.gauss_pattern.process.GaussPattern(**kwargs)

Bases: AbstractProcess

Gauss pattern generator Process.

This process generates Gauss patterns and send them through the OutPort a_out. It recomputes new patterns and sends them asynchronously only when one of the parameters amplitude, mean or stddev changes. Otherwise, sends an array full of numpy.nan.

Parameters:

shape: tuple(int)

number of neurons per dimension, e.g. shape=(30, 40)

amplitude: float

amplitude of the Gauss pattern

mean: list(float) or float

mean of the Gauss pattern

stddev: list(float) or float

standard deviation of the Gauss pattern

property amplitude: ndarray | None

Get value of the amplitude Var

Returns:

amplitude

Return type:

numpy.ndarray

property mean: ndarray | None

Get value of the mean Var

Returns:

mean

Return type:

numpy.ndarray

property shape: ndarray | None

Get value of the shape Var

Returns:

shape

Return type:

numpy.ndarray

property stddev: ndarray | None

Get value of the stddev Var

Returns:

stddev

Return type:

numpy.ndarray