Skip to content

Commit b60cb72

Browse files
fbbradheintzfmassa
authored andcommitted
Correctness test implemented with old test architecture (#1511)
* correctness test implemented with old test architecture * reverted an unneeded change, ran flake8 * moving to relative tolerance of 1 part in 10k for classification correctness checks * going down to 1 part in 1000 for correctness checks bc architecture differences * one percent relative tolerance
1 parent 937c83a commit b60cb72

File tree

37 files changed

+2
-0
lines changed

37 files changed

+2
-0
lines changed
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
543 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

test/test_models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ def check_script(self, model, name):
7272
def _test_classification_model(self, name, input_shape):
7373
# passing num_class equal to a number other than 1000 helps in making the test
7474
# more enforcing in nature
75+
set_rng_seed(0)
7576
model = models.__dict__[name](num_classes=50)
7677
self.check_script(model, name)
7778
model.eval()
7879
x = torch.rand(input_shape)
7980
out = model(x)
81+
self.assertExpected(out, rtol=1e-2, atol=0.)
8082
self.assertEqual(out.shape[-1], 50)
8183

8284
def _test_segmentation_model(self, name):

0 commit comments

Comments
 (0)