Layers#

Core modules#

Buffer

Class representing a non-learnable state array (e.g. running statistics).

Module

Base abstract class for all the modules.

Parameter

Class representing a learnable parameter.

Layers#

Layers are basic building blocks of neural networks.

The following table lists the available layers:

AvgPool1D

Apply a 1D average pooling.

AvgPool2D

Apply a 2D average pooling.

BatchNorm

Apply Batch Normalization over the channels of the input.

Conv1D

Apply a 1D convolution.

Conv2D

Apply a 2D convolution.

Dropout

Randomly zero some of the input values during training.

Flatten

Flatten a contiguous range of dimensions into a single dimension.

GlobalAvgPool

Apply a global average pooling over the spatial dimensions of the input.

GlobalMaxPool

Apply a global max pooling over the spatial dimensions of the input.

GroupNorm

Apply Group Normalization over the channels of the input.

GRU

Apply a multi-layer Gated Recurrent Unit (GRU) to an input sequence.

GRUCell

Apply a Gated Recurrent Unit (GRU) cell.

Identity

Identity operation.

InstanceNorm

Apply Instance Normalization over the spatial dimensions of the input.

LayerNorm

Apply Layer Normalization over the trailing dimensions of the input.

Linear

Apply a linear transformation over the final dimension of the input.

LSTM

Apply a multi-layer Long Short-Term Memory (LSTM) to an input sequence.

LSTMCell

Apply a Long Short-Term Memory (LSTM) cell.

MaxPool1D

Apply a 1D max pooling.

MaxPool2D

Apply a 2D max pooling.

RMSNorm

Apply Root Mean Square (RMS) Normalization over the trailing dimensions of the input.

RNN

Apply a multi-layer Elman's Recurrent Neural Network (RNN) to an input sequence.

RNNCell

Apply a Elman's Recurrent Neural Network (RNN) cell.

Sequential

Apply callable modules (e.g. layers, activation functions, etc.) connected in a cascading sequence.