mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-21 20:46:46 +08:00
Remove redundant assert in losses.py
This commit is contained in:
parent
7365d142a3
commit
185403538a
@ -133,10 +133,6 @@ def mse_loss(
|
||||
f"targets shape {targets.shape}."
|
||||
)
|
||||
|
||||
assert (
|
||||
predictions.shape == targets.shape
|
||||
), f"Shape of predictions {predictions.shape} and targets {targets.shape} must match"
|
||||
|
||||
loss = mx.square(predictions - targets)
|
||||
return _reduce(loss, reduction)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user