Question about custom backward
❓ Questions and Help
Before asking:

search the issues.
search the docs.


What is your question?
I want to write my own .backward. In the specification of method there are 4 arguments: self, use_amp, loss and optimizer:
def backward(self, use_amp, loss, optimizer)
But to do my backward I need additional tensors from training_step besides loss tensor. What is the safe and proper way to do it? Seems like there is no functionality to just add **kwargs or *args in backward and return something additional in training_step