Docs updates (#198)

Reorganize NN docs + a few other tidbits.
This commit is contained in:
Awni Hannun
2023-12-17 13:20:55 -08:00
committed by GitHub
parent 90d04072b7
commit ee0c2835c5
9 changed files with 160 additions and 74 deletions

View File

@@ -7,12 +7,21 @@ from mlx.nn.layers.base import Module
class Linear(Module):
"""Applies an affine transformation to the input.
r"""Applies an affine transformation to the input.
Concretely:
.. math::
y = W^\top x + b
where :math:`W` has shape ``[output_dims, input_dims]``.
Args:
input_dims (int): The dimensionality of the input features
output_dims (int): The dimensionality of the output features
bias (bool): If set to False then the layer will not use a bias
bias (bool, optional): If set to ``False`` then the layer will
not use a bias. Default ``True``.
"""
def __init__(self, input_dims: int, output_dims: int, bias: bool = True):