Contents

MLCGramMatrixLayer

A layer that computes the uncentered cross-correlation values between the spacial planes of each feature channel of a tensor.

Declaration

class MLCGramMatrixLayer

Overview

For example, if the input tensor batch function is:

x = x[b, y, x, c]

The computation performed by this layer is:

y = y[b, 1, f, c] = alpha * sum_{x, y} x[b, y, x, f] * x[b, y, x, c]

Interpret this operation as computing all combinations of fully connected layers between the different spatial planes of the input tensor.

The layer performs this operation independently for each tensor in a batch. Then the layer stores these results in the feature channel and x-coordinate indices of the output batch.

Legend:

b

The batch index.

y and x

The spatial coordinates.

c

The feature channel index.

alpha

The scaling factor.

Topics

Creating Gram Matrix Layers

Inspecting Gram Matrix Layers

See Also

Math Layers