Previous topic

models.ml.model

Next topic

models.ml.params

This Page

models.ml.ops

class glimpse.models.ml.ops.ModelOps(backend=None, params=None)

Bases: glimpse.models.viz2.ops.ModelOps

Base class for a Glimpse model based on Mutch & Lowe (2008).

This class implements all single-layer transformations.

BuildC1FromS1(s1s)

Compute the C1 layer activity from multi-scale S1 activity.

Parameters:s1s (list of 3D ndarray of float, or 4D ndarray of float) – S1 activity for each scale.
Returns:C1 activity, with one array per scale.
Return type:list of 3D ndarray of float
BuildS1FromRetina(retina)

Apply S1 processing to some existing retinal layer data.

Note

This method pools over phase, so the output has only scale and orientation bands.

Parameters:retina (2D ndarray of float) – Result of retinal layer processing.
Returns:S1 activity arrays, with one array per scale
Return type:list of 3D ndarray of float
BuildS2FromC1(c1s)

Compute the S2 layer activity from multi-scale C1 activity.

Parameters:c1s (4D ndarray of float, or list of 3D ndarray of float) – C1 activity
Returns:S2 activity for each scale
Return type:list of 3D ndarray of float
ParamsClass

The parameters type associated with this model.

alias of Params

s1_kernel_shape

The expected shape of the S1 kernels array, including band structure.

Return type:tuple of int
s1_kernels

The S1 kernels array, which are generated if not set.