Expand description
Neural network module.
Modules§
- Attention module
- Cache module
- Convolution module
- Gated Recurrent Unit module.
- Interpolate module
- Loss module
- Long Short-Term Memory module.
- Pooling module
- Transformer module
Structs§
- Applies Batch Normalization over a tensor as described in the paper Batch Normalization
- Configuration to create a BatchNorm layer using the init function.
- The record type for the module.
- The record item type for the module.
- The BiLstm module. This implementation is for Bidirectional LSTM.
- Configuration to create a BiLstm module using the init function.
- The record type for the module.
- The record item type for the module.
- Set at random some elements of the input tensor to zero during training.
- Configuration to create a Dropout layer using the init function.
- Lookup table to store a fix number of vectors.
- Configuration to create an Embedding layer using the init function.
- The record type for the module.
- The record item type for the module.
- 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.
- The record type for the module.
- The record item type for the module.
- Applies the Gaussian Error Linear Units function element-wise. See also gelu
- Applies Group Normalization over a mini-batch of inputs as described in the paper Group Normalization.
- Configuration to create a GroupNorm layer using the init function.
- The record type for the module.
- The record item type for the module.
- Hard Sigmoid layer.
- Configuration to create a Hard Sigmoid layer using the init function.
- Applies Instance Normalization over a tensor as described in the paper Instance Normalization
- Configuration to create a InstanceNorm layer using the init function.
- The record type for the module.
- The record item type for the module.
- Applies Layer Normalization over an input tensor as described in the paper Layer Normalization.
- Configuration to create a LayerNorm layer using the init function.
- The record type for the module.
- The record item type for the module.
- Leaky ReLu layer.
- Configuration to create a Leaky Relu layer using the init function.
- Applies a linear transformation to the input tensor:
- Configuration to create a Linear layer using the init function.
- The record type for the module.
- The record item type for the module.
- The Lstm module. This implementation is for a unidirectional, stateless, Lstm.
- Configuration to create a Lstm module using the init function.
- The record type for the module.
- The record item type for the module.
- A LstmState is used to store cell state and hidden state in LSTM.
- Parametric Relu layer.
- Configuration to create a Parametric Relu layer using the init function.
- The record type for the module.
- The record item type for the module.
- Positional encoding layer for transformer models.
- Configuration to create a PositionalEncoding layer using the init function.
- The record type for the module.
- The record item type for the module.
- Applies the rectified linear unit function element-wise See also relu
- Applies RMS Normalization over an input tensor along the last dimension.
- Configuration to create a RMS Norm layer using the init function.
- The record type for the module.
- The record item type for the module.
- 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.
- Configuration to create a RotaryEncoding layer using the init function.
- The record type for the module.
- The record item type for the module.
- Applies the sigmoid function element-wise See also sigmoid
- Applies the SwiGLU or Swish Gated Linear Unit to the input tensor. The SwiGLU activation function is defined as:
SwiGLU(x) = Swish(W_inner * x + b_inner) * (W_outer * x + b_outer)
- Configuration to create a SwiGlu activation layer using the init function.
- The record type for the module.
- The record item type for the module.
- Applies the tanh activation function element-wise See also tanh
- Four-dimensional unfolding.
- Configuration to create an unfold 4d layer using the init function.
Enums§
- Enum specifying with what values a tensor should be initialized
- Padding configuration for 1D operators.
- Padding configuration for 2D operators.
- Padding configuration for 3D operators.
Functions§
- Returns sinusoids for positional embedding introduced in Attention is all you need.