示例#1
0
 def test_shape(self, input_param, input_data, expected_shape):
     net = Discriminator(**input_param)
     net.eval()
     with torch.no_grad():
         result = net.forward(input_data)
         self.assertEqual(result.shape, expected_shape)
示例#2
0
 def test_shape(self, input_param, input_data, expected_shape):
     net = Discriminator(**input_param)
     with eval_mode(net):
         result = net.forward(input_data)
         self.assertEqual(result.shape, expected_shape)