BiasFreeLinearLayer<T>

Layers ยท AiDotNet.NeuralNetworks.Layers

Trainable linear projection y = xW with no bias term.

Inheritance: LayerBase<T> โ†’ BiasFreeLinearLayer<T>

Implements: IShapeContract

For Beginners

This layer changes the feature width using only a weight matrix. Omitting the bias is useful when the surrounding architecture already supplies an offset or when the paper explicitly requires a pure projection.

Constructors

Constructor Summary
BiasFreeLinearLayer(int inputSize, int outputSize)

Properties

Property Summary
bool SupportsTraining { get; }
int InputSize { get; }
int OutputSize { get; }

Methods

Method Summary
Dictionary<string, string> GetParameterRoles() Returns parameter roles for per-role optimizer configuration (e.g., weight decay exemption for biases).
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank)
IReadOnlyList<Tensor<T>> GetTrainableParameters() Returns all trainable parameter tensors marked with [TrainableParameter].
void ResetState()
void SetTrainableParameters(IReadOnlyList<Tensor<T>> parameters) Replaces trainable parameter tensors (e.g., with ParameterBuffer views).
void UpdateParameters(T learningRate)
void ZeroGrad() Clears all gradient fields discovered by convention ({paramName}Gradient).