lava.lib.dnf.kernels
lava.lib.dnf.kernels.kernels
digraph inheritance2d01595856 { 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"]; "GaussianMixin" [URL="../lava-lib-dnf/lava.lib.dnf.kernels.html#lava.lib.dnf.kernels.kernels.GaussianMixin",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="Mixin for kernels that are generated with the gauss function."]; "ABC" -> "GaussianMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Kernel" [URL="../lava-lib-dnf/lava.lib.dnf.kernels.html#lava.lib.dnf.kernels.kernels.Kernel",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 kernel that can be used in the Convolution operation."]; "MultiPeakKernel" [URL="../lava-lib-dnf/lava.lib.dnf.kernels.html#lava.lib.dnf.kernels.kernels.MultiPeakKernel",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="\"Mexican hat\" kernel (local excitation and mid-range inhibition) for a"]; "GaussianMixin" -> "MultiPeakKernel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Kernel" -> "MultiPeakKernel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SelectiveKernel" [URL="../lava-lib-dnf/lava.lib.dnf.kernels.html#lava.lib.dnf.kernels.kernels.SelectiveKernel",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="A kernel that enables creating a selective dynamic neural field"]; "GaussianMixin" -> "SelectiveKernel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Kernel" -> "SelectiveKernel" [arrowsize=0.5,style="setlinewidth(0.5)"]; }- 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
- property weights: ndarray
Returns the weights
- 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