Skip to main content

Module projection_layer

Module projection_layer 

Source
Expand description

Linear embedding projection layer (dimensionality reduction or expansion).

ProjectionLayer wraps a weight matrix and bias vector together with an optional activation function. It can reduce high-dimensional embeddings to a smaller space (e.g. 768 → 128) or expand them to a larger space.

Structs§

ProjectionLayer
A linear projection layer: output = activation(W·input + b).
ProjectionMatrix
The weight matrix and bias for a linear projection.

Enums§

ActivationFn
Activation function applied element-wise to the projected output.
InitMethod
Initialisation methods for the projection weights.