コード例 #1
0
 def test_fcn_shape(self, input_param, input_data, expected_shape):
     net = FCN(**input_param)
     net.eval()
     with torch.no_grad():
         result = net.forward(input_data)
         self.assertEqual(result.shape, expected_shape)
コード例 #2
0
ファイル: test_ahnet.py プロジェクト: sahandazad/MONAI
 def test_fcn_shape(self, input_param, input_shape, expected_shape):
     net = FCN(**input_param).to(device)
     with eval_mode(net):
         result = net.forward(torch.randn(input_shape).to(device))
         self.assertEqual(result.shape, expected_shape)