def test_parameters(self): for tensor in self._model.parameters(): assert_not_nan(tensor) assert_isfinite(tensor)
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)
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)