Replies: 1 comment 4 replies
-
@ipcamit Did you find a solution? I have the same problem. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to export a model which can do partial diff against input variables during forward pass, using autograd. I am bit confused if it can be exported to an onnx object or not. The ONNX repository operators readme hints it might be possible (https://github.com/onnx/onnx/blob/master/docs/Operators.md#ai.onnx.preview.training.Gradient). But i get next to no search results on googling "ai.onnx.preview.training.Gradient".
Some discussions suggest it might not be possible (pytorch/pytorch#15644) with reason quoted as
I do not understand that, TorchScript does support gradients, does it not (I can easily compile my modules with calls to autograd.grad using torch.jit.script())?
Discussion here is bit more ambiguous for me microsoft/onnxruntime#5892
Can anyone tell if it is possible to export models in onnx with grad calls in forward function?
Beta Was this translation helpful? Give feedback.
All reactions