Table Of Contents

Previous topic

glab

Next topic

models.ml.model

This Page

models.misc

Functions

glimpse.models.misc.ImageLayerFromInputArray(input_, backend)

Create the initial image layer from some input.

Parameters:input (PIL.Image or 2D ndarray of float) – Input data. If array, values should lie in the range [0, 1].
Returns:Image layer data.
Return type:2D ndarray of float
glimpse.models.misc.SampleC1Patches(c1s, kwidth)

Sample patches from a layer of C1 activity.

Parameters:c1s (4D ndarray, or list of 3D ndarray) – C1 activity maps, one map per scale.
Returns:Infinite iterator over prototype arrays and corresponding locations (i.e., iterator elements are 2-tuples). Prototype location gives top-left corner of C1 region.

Exceptions

exception glimpse.models.misc.DependencyError

Indicates that a dependency required to build a node in the network is unavailable.

exception glimpse.models.misc.InputSourceLoadException(msg=None, source=None)

Thrown when an input source can not be loaded.

Classes

class glimpse.models.misc.AbstractNetwork

An abstract base class for a Glimpse model.

This class provides the scafolding for recursive dependency satisfaction.

class glimpse.models.misc.InputSource(image_path=None, resize=None)

Describes the input to a hierarchical model.

Examples include the path to a single image, or the path and frame of a video.

class glimpse.models.misc.LayerSpec(id, name=None, *depends)

Describes a single layer in a model.