示例#1
0
 def test_super_resolution(self):
     super_resolution_net = SuperResolutionNet(upscale_factor=3)
     state_dict = model_zoo.load_url(model_urls['super_resolution'], progress=False)
     x = torch.randn(1, 1, 224, 224, requires_grad=True)
     self.run_model_test(super_resolution_net, train=False,
                         batch_size=BATCH_SIZE, state_dict=state_dict,
                         input=x, use_gpu=False, atol=1e-6)
示例#2
0
 def test_super_resolution(self):
     x = Variable(torch.randn(BATCH_SIZE, 1, 224, 224).fill_(1.0))
     self.exportTest(toC(SuperResolutionNet(upscale_factor=3)),
                     toC(x),
                     atol=1e-6)