Module modules

Module modules 

Expand description

Neural network modules implementations.

Modules§

attention
Attention module
basic
Basic RNN.
cache
Cache module
conv
Convolution module
gru
Gated Recurrent Unit module.
interpolate
Interpolate module
lstm
Long Short-Term Memory module.
norm
Normalization Layers
pool
Pooling module
transformer
Transformer module

Structs§

BatchNorm
Applies Batch Normalization over a tensor.
BatchNormConfig
BatchNorm Configuration.
BatchNormRecord
The record type for the module.
BatchNormRecordItem
The record item type for the module.
BiGru
The BiGru module. This implementation is for Bidirectional GRU.
BiGruConfig
Configuration to create a BiGru module using the init function.
BiGruRecord
The record type for the module.
BiGruRecordItem
The record item type for the module.
BiLstm
The BiLstm module. This implementation is for Bidirectional LSTM.
BiLstmConfig
Configuration to create a BiLstm module using the init function.
BiLstmRecord
The record type for the module.
BiLstmRecordItem
The record item type for the module.
BiRnn
The BiRnn module. This implementation is for Bidirectional RNN. Should be created with BiRnnConfig.
BiRnnConfig
Configuration to create a BiRnn module using the init function.
BiRnnRecord
The record type for the module.
BiRnnRecordItem
The record item type for the module.
Dropout
Set at random some elements of the input tensor to zero during training.
DropoutConfig
Configuration to create a Dropout layer using the init function.
Embedding
Lookup table to store a fix number of vectors.
EmbeddingConfig
Configuration to create an Embedding layer using the init function.
EmbeddingRecord
The record type for the module.
EmbeddingRecordItem
The record item type for the module.
GateController
A GateController represents a gate in an LSTM cell. An LSTM cell generally contains three gates: an input gate, forget gate, and output gate. Additionally, cell gate is just used to compute the cell state.
GateControllerRecord
The record type for the module.
GateControllerRecordItem
The record item type for the module.
GaussianNoise
Add pseudorandom Gaussian noise to an arbitrarily shaped tensor.
GaussianNoiseConfig
Configuration to create a GaussianNoise layer using the init function.
GroupNorm
Applies Group Normalization over a mini-batch of inputs as described in the paper Group Normalization.
GroupNormConfig
Configuration to create a GroupNorm layer using the init function.
GroupNormRecord
The record type for the module.
GroupNormRecordItem
The record item type for the module.
Gru
The Gru (Gated recurrent unit) module. This implementation is for a unidirectional, stateless, Gru.
GruConfig
Configuration to create a gru module using the init function.
GruRecord
The record type for the module.
GruRecordItem
The record item type for the module.
InstanceNorm
Applies Instance Normalization over a tensor as described in the paper Instance Normalization
InstanceNormConfig
Configuration to create a InstanceNorm layer using the init function.
InstanceNormRecord
The record type for the module.
InstanceNormRecordItem
The record item type for the module.
LayerNorm
Applies Layer Normalization over an input tensor as described in the paper Layer Normalization.
LayerNormConfig
Configuration to create a LayerNorm layer using the init function.
LayerNormRecord
The record type for the module.
LayerNormRecordItem
The record item type for the module.
Linear
Applies a linear transformation to the input tensor.
LinearConfig
Configuration to create a Linear layer using the init function.
LinearRecord
The record type for the module.
LinearRecordItem
The record item type for the module.
LocalResponseNorm
Applies Local Response Normalization as described in ImageNet Classification with Deep Convolutional Neural Networks.
LocalResponseNormConfig
Configuration to create a LocalResponseNorm layer using the init function.
Lstm
The Lstm module. This implementation is for a unidirectional, stateless, Lstm.
LstmConfig
Configuration to create a Lstm module using the init function.
LstmRecord
The record type for the module.
LstmRecordItem
The record item type for the module.
LstmState
A LstmState is used to store cell state and hidden state in LSTM.
PositionalEncoding
Positional encoding layer for transformer models.
PositionalEncodingConfig
Configuration to create a PositionalEncoding layer using the init function.
PositionalEncodingRecord
The record type for the module.
PositionalEncodingRecordItem
The record item type for the module.
RmsNorm
Applies RMS Normalization over an input tensor along the last dimension.
RmsNormConfig
Configuration to create a RMS Norm layer using the init function.
RmsNormRecord
The record type for the module.
RmsNormRecordItem
The record item type for the module.
Rnn
The Rnn module. This implementation is for a unidirectional, stateless, Rnn. Should be created with RnnConfig.
RnnConfig
Configuration to create a Rnn module using the init function.
RnnRecord
The record type for the module.
RnnRecordItem
The record item type for the module.
RnnState
A RnnState is used to store hidden state in RNN.
RotaryEncoding
A module that applies rotary positional encoding to a tensor. Rotary Position Encoding or Embedding (RoPE), is a type of position embedding which encodes absolute positional information with rotation matrix and naturally incorporates explicit relative position dependency in self-attention formulation.
RotaryEncodingConfig
Configuration to create a RotaryEncoding layer using the init function.
RotaryEncodingRecord
The record type for the module.
RotaryEncodingRecordItem
The record item type for the module.
Unfold4d
Four-dimensional unfolding.
Unfold4dConfig
Configuration to create an unfold 4d layer using the init function.

Enums§

LinearLayout
The layout in which the linear parameters are stored.

Functions§

generate_sinusoids
Returns sinusoids for positional embedding introduced in Attention is all you need.