SVTRMixingBlockLayer<T>

Layers · AiDotNet.NeuralNetworks.Layers

SVTR local/global component-mixing block with the released model’s pre-normalization and MLP.

Inheritance: LayerBase<T> → SVTRMixingBlockLayer<T>

Implements: IShapeContract

For Beginners

Local mixing lets each visual token attend to nearby text strokes, while global mixing lets later blocks connect the full word. The residual MLP then refines each token without changing the image-token grid.

How It Works

Reference: Du et al., “SVTR: Scene Text Recognition with a Single Visual Model”, IJCAI 2022.

Constructors

Constructor Summary
SVTRMixingBlockLayer(int hiddenSize, int numHeads, int height, int width, int windowHeight, int windowWidth, bool local, double dropPathRate)

Properties

Property Summary
bool SupportsTraining { get; }
bool UsesLocalMixing { get; }
bool UsesPreNormalization { get; }
double DropPathRate { get; }
int GridHeight { get; }
int GridWidth { get; }
int HiddenSize { get; }
int NumHeads { get; }
int WindowHeight { get; }
int WindowWidth { get; }

Methods

Method Summary
IReadOnlyList<ILayer<T>> GetSubLayers()
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) Derived from this type’s [TensorLayout] declarations.
void ClearGradients()
void ResetState()
void UpdateParameters(T learningRate)