mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-24 09:21:16 +08:00
Fix failing test for log cosh loss (#275)
* fix assert statement in log_cosh_loss * reformatted by pre-commit black
This commit is contained in:
parent
acf1721b98
commit
8c3da54c7d
@ -597,7 +597,7 @@ class TestNN(mlx_tests.MLXTestCase):
|
||||
inputs = mx.ones((2, 4))
|
||||
targets = mx.zeros((2, 4))
|
||||
loss = nn.losses.log_cosh_loss(inputs, targets, reduction="mean")
|
||||
self.assertEqual(loss, 0.433781)
|
||||
self.assertAlmostEqual(loss.item(), 0.433781, places=6)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user