mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-25 01:41:17 +08:00
Remove redundant assert in losses.py (#281)
This commit is contained in:
parent
7365d142a3
commit
22fee5a383
@ -133,10 +133,6 @@ def mse_loss(
|
|||||||
f"targets shape {targets.shape}."
|
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)
|
loss = mx.square(predictions - targets)
|
||||||
return _reduce(loss, reduction)
|
return _reduce(loss, reduction)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user