Element type for an array of Glimpse activation values.
Backend name used by MakeBackend when no name is supplied.
Return an instance of the given backend.
Parameters: | name (str) – Name of requested backend. |
---|
Thrown when an input source can not be loaded.
The source of the exception. This is generally an InputSource object.
Describes the input to a hierarchical model.
Example:
Load a still image from disk.
>>> source = InputSource(image_path = "/tmp/MyImage.jpg")
Reads image from this input source.
Return type: | PIL.Image |
---|
Path to the image file.
Thrown when an unexpected error occurs during backend processing.
The model layer that was being computed.
The scale band that was being computed.
The source of the exception. This is generally an InputSource object.
Thrown when an input array was too small (spatially).
The interface implemented by all backend implementations.
Apply local contrast stretch to an array.
Given a local input neighborhood \(X\), the output is
where \(x_c\) is the center of the input neighborhood, \(\mu\) and \(\sigma\) are the mean and standard deviation of \(X\), and \(\epsilon\) is a bias term. This term is used to avoid the amplificiation of noise and to ensure a non-zero divisor.
Parameters: |
|
---|---|
Return type: | 2D ndarray of float |
Convolve an array with a set of kernels.
This function compares each kernel \(W\) and input neigborhood \(X\) using a dot product, where the output is given by
where \(X^T\) denotes the matrix transpose.
Parameters: |
|
---|---|
Return type: | 3D ndarray of float |
Find the per-band maxima.
Parameters: |
|
---|---|
Return type: | 1D ndarray of float |
Given an output map with the given dimensions, compute the shape of the corresponding input map.
This is the inverse of OutputMapShapeForInput().
Parameters: |
|
---|---|
Returns: | Input map height and width, in that order. |
Return type: | 2-tuple of int |
Convolve maps with local 2-D max filter.
The output for each local input neighborhood \(X\) is
Parameters: |
|
---|---|
Return type: | 3D ndarray of float |
Convolve an array with a set of kernels, normalizing the response by the vector length of the input neighborhood.
The output for each kernel \(W\) and input neighborhood \(X\) is given by
where \(\left\Vert \cdot \right\Vert\) denotes the Euclidean norm.
Parameters: |
|
---|---|
Return type: | 3D ndarray of float |
The output for each kernel \(W\) and input neighborhood \(X\) is given by
where \(\text{NDP}(\cdot)\) is the normalized dot product.
Parameters: |
|
---|---|
Return type: | 3D ndarray of float |
Given an input map with the given dimensions, compute the shape of the corresponding output map.
Parameters: |
|
---|---|
Returns: | Output map height and width, in that order. |
Return type: | 2-tuple of int |
Prepare array to be passed to backend methods.
Parameters: | array (ndarray of float) – Array to be prepared, which will not be modified. |
---|---|
Return type: | ndarray of float |
Compare kernels to input data using the RBF activation function.
The output for each kernel \(W\) and input neighborhood \(X\) is given by
where \(\beta\) controls the sensitivity of the RBF.
Parameters: |
|
---|---|
Return type: | 3D ndarray of float |