.. _layers:

.. currentmodule:: mlx.nn

Layers
------

.. autosummary::
   :toctree: _autosummary
   :template: nn-module-template.rst

   ALiBi
   AllToShardedLinear
   AvgPool1d
   AvgPool2d
   AvgPool3d
   BatchNorm
   Bilinear
   CELU
   Conv1d
   Conv2d
   Conv3d
   ConvTranspose1d
   ConvTranspose2d
   ConvTranspose3d
   Dropout
   Dropout2d
   Dropout3d
   Embedding
   ELU
   GELU
   GLU
   GroupNorm
   GRU
   HardShrink
   HardTanh
   Hardswish
   Identity
   InstanceNorm
   LayerNorm
   LeakyReLU
   Linear
   LogSigmoid
   LogSoftmax
   LSTM
   MaxPool1d
   MaxPool2d
   MaxPool3d
   Mish
   MultiHeadAttention
   PReLU
   QQLinear
   QuantizedAllToShardedLinear
   QuantizedEmbedding
   QuantizedLinear
   QuantizedShardedToAllLinear
   RMSNorm
   ReLU
   ReLU2
   ReLU6
   RNN
   RoPE
   SELU
   Sequential
   ShardedToAllLinear
   Sigmoid
   SiLU
   SinusoidalPositionalEncoding
   Softmin
   Softshrink
   Softsign
   Softmax
   Softplus
   Step
   Tanh
   Transformer
   TransformerDecoder
   TransformerDecoderLayer
   TransformerEncoder
   TransformerEncoderLayer
   Upsample
