From 22fee5a38354d2d86d8a44d2bfe8a9f0e3b4d67c Mon Sep 17 00:00:00 2001 From: Zach Schillaci Date: Sun, 24 Dec 2023 11:39:08 -0500 Subject: [PATCH] Remove redundant assert in losses.py (#281) --- python/mlx/nn/losses.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/python/mlx/nn/losses.py b/python/mlx/nn/losses.py index 35aedf755..cfb6ffa15 100644 --- a/python/mlx/nn/losses.py +++ b/python/mlx/nn/losses.py @@ -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)