ASL icon indicating copy to clipboard operation
ASL copied to clipboard

Unit tests are invalid

Open noa-codes opened this issue 1 year ago • 0 comments

Hi - Thanks for this terrific paper and thank you for sharing the code!

Just wanted to point out that the tests in tests/test_asl.py are not valid, and they all fail, e.g.

======================================================================
FAIL: test_forward_clipped_logits (tests.test_asl.TestAsymmetricLoss)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/nbenditshtull/development/ASL/tests/test_asl.py", line 62, in test_forward_clipped_logits
    self.assertEqual(self.loss(x, y), expected_loss)
AssertionError: tensor(3.8641) != tensor(0.3188)

======================================================================
FAIL: test_forward_disable_torch_grad_focal_loss (tests.test_asl.TestAsymmetricLoss)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/nbenditshtull/development/ASL/tests/test_asl.py", line 90, in test_forward_disable_torch_grad_focal_loss
    self.assertEqual(self.loss(x, y), expected_loss)
AssertionError: tensor(3.8641) != tensor(0.3188)

======================================================================
FAIL: test_forward_eps (tests.test_asl.TestAsymmetricLoss)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/nbenditshtull/development/ASL/tests/test_asl.py", line 83, in test_forward_eps
    self.assertEqual(self.loss(x, y), expected_loss)
AssertionError: tensor(1.1670) != tensor(0.3162)

noa-codes avatar Jun 15 '23 15:06 noa-codes