Exemplo n.º 1
0
 def test_shape(self, input_param, input_data, expected_shape):
     net = DynUNet(**input_param)
     net.eval()
     with torch.no_grad():
         result = net(input_data)
         self.assertEqual(result.shape, expected_shape)
Exemplo n.º 2
0
 def test_shape(self, input_param, input_shape, expected_shape):
     net = DynUNet(**input_param).to(device)
     net.eval()
     with torch.no_grad():
         result = net(torch.randn(input_shape).to(device))
         self.assertEqual(result.shape, expected_shape)