Exemple #1
0
 def test_parameters(self):
     for tensor in self._model.parameters():
         assert_not_nan(tensor)
         assert_isfinite(tensor)
Exemple #2
0
 def test_forward(self):
     test_array = torch.randn(*config["INPUT_DIM"])
     pred = forward(self._model, test_array, self.device)
     assert tuple(pred.shape) == config["OUTPUT_DIM"]
     assert_isfinite(pred)
     assert_not_nan(pred)
Exemple #3
0
 def test_forward(self):
     test_array = torch.randn(1, 3, 256, 256)
     pred = forward(self.model, test_array, self.device)
     assert tuple(pred.shape) == (1, )
     assert_isfinite(pred)
     assert_not_nan(pred)