Reputation:
Tensors which can calculate gradient will have grad_fn=AddBackward0 or MulBackward0 or SubBackward0.
Is there any Python command that can list all these "xxxBackward0" methods and their respective forward and backward formulas?
Upvotes: 0
Views: 186
Reputation: 5473
I don't know about a singular python command, but you can check out the methods for torch.Tensor.
Basically all tensor operations that aren't "hard" (ie like argsort, logical operators) have a backward method implemented.
Upvotes: 0