def _check_training_step_output(self, training_step_output):
    if (isinstance(training_step_output, torch.Tensor) and (not self.trainer.lightning_module.automatic_optimization)):
        if (training_step_output.grad_fn is None):
            raise MisconfigurationException('In manual optimization, `training_step` should not return a Tensor')
def _check_training_step_output(self, training_step_output):
    if (isinstance(training_step_output, torch.Tensor) and (not self.trainer.lightning_module.automatic_optimization)):
        if (training_step_output.grad_fn is None):
            raise MisconfigurationException('In manual optimization, `training_step` should not return a Tensor')