From 07b69231adf89b257427cbe0907726210ee63d80 Mon Sep 17 00:00:00 2001 From: Sean Naren Date: Thu, 10 Jun 2021 12:35:32 +0100 Subject: [PATCH] Remove fn check for ipu output (#7915) --- .../trainer/connectors/logger_connector/result_new.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pytorch_lightning/trainer/connectors/logger_connector/result_new.py b/pytorch_lightning/trainer/connectors/logger_connector/result_new.py index bf155ad421..cbc3dcfdef 100644 --- a/pytorch_lightning/trainer/connectors/logger_connector/result_new.py +++ b/pytorch_lightning/trainer/connectors/logger_connector/result_new.py @@ -264,8 +264,6 @@ class ResultCollection(dict): if loss is not None: if not isinstance(loss, torch.Tensor): raise ValueError(f"`Result.minimize` must be a `torch.Tensor`, found: {loss}") - if loss.grad_fn is None: - raise RuntimeError("`Result.minimize` must have a `grad_fn`") self._minimize = loss @property