2023-12-18 05:20:55 +08:00
|
|
|
.. _nn_functions:
|
|
|
|
|
|
|
|
.. currentmodule:: mlx.nn
|
|
|
|
|
|
|
|
Functions
|
|
|
|
---------
|
|
|
|
|
|
|
|
Layers without parameters (e.g. activation functions) are also provided as
|
|
|
|
simple functions.
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:toctree: _autosummary_functions
|
|
|
|
:template: nn-module-template.rst
|
|
|
|
|
2024-02-27 11:28:53 +08:00
|
|
|
elu
|
2023-12-18 05:20:55 +08:00
|
|
|
gelu
|
|
|
|
gelu_approx
|
|
|
|
gelu_fast_approx
|
2024-02-27 11:28:53 +08:00
|
|
|
glu
|
|
|
|
hardswish
|
|
|
|
leaky_relu
|
|
|
|
log_sigmoid
|
|
|
|
log_softmax
|
2024-01-17 11:37:50 +08:00
|
|
|
mish
|
2023-12-18 05:20:55 +08:00
|
|
|
prelu
|
2024-01-17 11:37:50 +08:00
|
|
|
relu
|
2024-02-27 11:28:53 +08:00
|
|
|
relu6
|
2024-01-17 11:37:50 +08:00
|
|
|
selu
|
2024-02-27 11:28:53 +08:00
|
|
|
sigmoid
|
2023-12-18 05:20:55 +08:00
|
|
|
silu
|
2024-02-27 11:28:53 +08:00
|
|
|
softmax
|
|
|
|
softplus
|
|
|
|
softshrink
|
2023-12-18 05:20:55 +08:00
|
|
|
step
|
2024-02-27 11:28:53 +08:00
|
|
|
tanh
|