Skip to content

More losses! #76

Closed
Closed
@h-0-0

Description

Hi, I thought it could be nice if there were a few more losses ready to go in mlx. To start with I was thinking:

  • L1_loss (L1 loss)
  • mse_loss (mean squared error)

Maybe also:

  • nll_loss (negative log likelihood loss)
  • kl_div_loss (KL-divergence loss)

Think this should pretty straightforward to do? Simply a case of adding them to python/mlx/nn/losses.py

Any thoughts? And I am happy to work on this issue.

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions