Commit d762537c authored by buoyancy99's avatar buoyancy99 Committed by Francisco Massa
Browse files

Update test for detection model to test input list unmodified (#1085)

* Update test for detection model to test input list unmodified

Update test for detection model to test input list unmodified according to suggestion in a previous PR

* test input unchaged
parent 793c4e82
...@@ -45,7 +45,9 @@ class Tester(unittest.TestCase): ...@@ -45,7 +45,9 @@ class Tester(unittest.TestCase):
model.eval() model.eval()
input_shape = (3, 300, 300) input_shape = (3, 300, 300)
x = torch.rand(input_shape) x = torch.rand(input_shape)
out = model([x]) model_input = [x]
out = model(model_input)
self.assertIs(model_input[0], x)
self.assertEqual(len(out), 1) self.assertEqual(len(out), 1)
self.assertTrue("boxes" in out[0]) self.assertTrue("boxes" in out[0])
self.assertTrue("scores" in out[0]) self.assertTrue("scores" in out[0])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment