-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Line 126 of test_dynunet.py has:
with torch.no_grad():
blah
but when changing to:
net.eval()
with torch.no_grad():
blah
the unit test fails with the following error:
File "test_dynunet.py", line 129, in test_shape
self.assertEqual(len(results), len(expected_shape))
AssertionError: 1 != 3
Spotted in this PR, which calls eval and no_grad together: #1384.
To Reproduce
- run
python tests/test_dynunet.py-- all ok - insert
net.eval()at line 126 of test_dynunet.py - run
python tests/test_dynunet.py-- error
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working