How does pytorch know the second order derivative of a Function subclass implemented by myself?
In my opinion, it’s impossible to know it if there is only forward() and backward() implementation.
How does pytorch know the second order derivative of a Function subclass implemented by myself?
In my opinion, it’s impossible to know it if there is only forward() and backward() implementation.
Because all the operations in the backwards are themselves differentiable operations on the Variable
class.
Oh, I see! Thanks so much!