ContextNetBlockLayer<T>
Layers ยท AiDotNet.NeuralNetworks.Layers
A paper-faithful ContextNet convolution block over channels-first [B, C, T] features.
Inheritance: LayerBase<T> โ ContextNetBlockLayer<T>
Implements: IShapeContract
How It Works
Han et al. (INTERSPEECH 2020, arXiv:2005.03191, sections 2.2.1-2.2.4) define each convolution as depthwise-separable Conv1D followed by batch normalization and Swish. The stacked convolution path is recalibrated by utterance-wide squeeze-and-excitation, added to a projected residual, and passed through Swish. C0 and C22 retain the main path and SE but omit the residual projection, as specified by Table 1.
Constructors
| Constructor | Summary |
|---|---|
ContextNetBlockLayer(int inputChannels, int outputChannels, int kernelSize, int numConvolutions, int seReductionRatio, double dropoutRate, int stride, bool useResidual, int seed) |
Properties
| Property | Summary |
|---|---|
bool SupportsTraining { get; } |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<ILayer<T>> GetSubLayers() |
|
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) |
|
void ResetState() |
|
void SetTrainingMode(bool isTraining) |
|
void UpdateParameters(T learningRate) |