mlx.nn.Linear

class mlx.nn.Linear(input_dims: int, output_dims: int, bias: bool = True)

Applies an affine transformation to the input.

Parameters:
  • 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