mlx-examples
mlx-examples copied to clipboard
mlx.nn.losses.binary_cross_entropy should have class weights support
For training with imbalanced datasets, providing the weights for classes is one of the most common features I use when training neural networks. The mlx implementation of this loss doesn't have this feature implemented yet, so wanted to point that out.
class mlx.nn.losses.binary_cross_entropy(logits: array, targets: array, reduction: str = 'none')
hey @awni can I work on this? seems good to start on MLX
That would be great!
since this issue is fixed with the merged PR, @awni I would request to close this issue.