lava.lib.dnf.kernels
lava.lib.dnf.kernels.kernels

- class lava.lib.dnf.kernels.kernels.GaussianMixin(amp_exc, width_exc, limit=1.0, shape=None, dominant_width=None)
Bases:
ABC
Mixin for kernels that are generated with the gauss function.
- Parameters
amp_exc (float) – amplitude of the excitatory Gaussian of the kernel
width_exc (list(float)) – widths of the excitatory Gaussian of the kernel
limit (float) – determines the size/shape of the kernel such that the weight matrix will have the size 2*limit*width_exc; defaults to 1
shape (tuple(int), optional) – will return the weight with this explicit shape; if used, the limit argument will have no effect
- class lava.lib.dnf.kernels.kernels.Kernel(weights, padding_value=0)
Bases:
object
Represents a kernel that can be used in the Convolution operation.
- Parameters
weights (numpy.ndarray) – weight matrix of the kernel
padding_value (float, optional) – value that is used to pad the kernel when the Convolution operation uses BorderType.PADDED
- property padding_value: float
Returns the padding value
- Return type
float
- property weights: ndarray
Returns the weights
- Return type
ndarray
- class lava.lib.dnf.kernels.kernels.MultiPeakKernel(amp_exc, width_exc, amp_inh, width_inh, limit=1.0, shape=None)
Bases:
GaussianMixin
,Kernel
“Mexican hat” kernel (local excitation and mid-range inhibition) for a DNF that enables it to create multiple peaks.
- Parameters
amp_inh (float) – amplitude of the inhibitory Gaussian of the kernel
width_inh (list(float)) – widths of the inhibitory Gaussian of the kernel
- class lava.lib.dnf.kernels.kernels.SelectiveKernel(amp_exc, width_exc, global_inh, limit=1.0, shape=None)
Bases:
GaussianMixin
,Kernel
A kernel that enables creating a selective dynamic neural field (local excitation, global inhibition).
- Parameters
amp_exc (float) – amplitude of the excitatory Gaussian of the kernel
width_exc (list(float)) – widths of the excitatory Gaussian of the kernel
global_inh (float) – global inhibition of the kernel; must be negative
limit (float) – determines the size/shape of the kernel such that the weight matrix will have the size 2*limit*width_exc; defaults to 1
shape (tuple(int), optional) – will return the weight with this explicit shape; if used, the limit argument will have no effect