tabensemb.model.AbstractNN.manual_backward#
method
- AbstractNN.manual_backward(loss: Tensor, *args: Any, **kwargs: Any) None#
Call this directly from your
training_step()when doing optimizations manually. By using this, Lightning can ensure that all the proper scaling gets applied when using mixed precision.See manual optimization for more examples.
Example:
def training_step(...): opt = self.optimizers() loss = ... opt.zero_grad() # automatically applies scaling, etc... self.manual_backward(loss) opt.step()