45ca429994196d479bef22edbbf36dc9698350d2,tests/test_utils/test_model_utils.py,ModelUtilTester,test_model_tester_cuda,#ModelUtilTester#,14
Before Change
mu.ModelTester((1, 10, 32, 32), (1, 30, 32, 32))(model)
def test_model_tester_cuda(self):
if not torch.cuda.is_available():
return
model = \
mu.ModelTester((1, 10, 32, 32), (1, 20, 32, 32))(nn.Conv2d(10, 20, 3, padding=1).cuda())
with self.assertRaises(ShapeError):
mu.ModelTester((1, 10, 32, 32), (1, 30, 32, 32))(model)
After Change
@unittest.skipUnless(torch.cuda.is_available())
def test_model_tester_cuda(self):
tester = mu.ModelTester((1, 10, 32, 32), (1, 20, 32, 32)).cuda()
model = tester(nn.Conv2d(10, 20, 3, padding=1).cuda())
with self.assertRaises(ShapeError):
mu.ModelTester((1, 10, 32, 32), (1, 30, 32, 32))(model)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: inferno-pytorch/inferno
Commit Name: 45ca429994196d479bef22edbbf36dc9698350d2
Time: 2018-12-19
Author: steffen.wolf@iwr.uni-heidelberg.de
File Name: tests/test_utils/test_model_utils.py
Class Name: ModelUtilTester
Method Name: test_model_tester_cuda
Project Name: open-mmlab/mmcv
Commit Name: f0e68404d26a67481de32fdb138be171a23ac2aa
Time: 2020-12-17
Author: 12756472+wangruohui@users.noreply.github.com
File Name: tests/test_ops/test_nms_rotated.py
Class Name: TestNmsRotated
Method Name: test_nms_rotated
Project Name: open-mmlab/mmcv
Commit Name: f0e68404d26a67481de32fdb138be171a23ac2aa
Time: 2020-12-17
Author: 12756472+wangruohui@users.noreply.github.com
File Name: tests/test_ops/test_nms_rotated.py
Class Name: TestNmsRotated
Method Name: test_ml_nms_rotated