-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exported HF models contain SoftmaxCrossEntropyLoss node #2267
Comments
Maybe you would want to hack around here to make it eval mode: https://github.com/pytorch/pytorch/blob/01694eaa56adb343f5d3d15b53d2962615dafe17/benchmarks/dynamo/huggingface.py#L513-L520 |
I think it is the eval path that's being run, since |
I notice that using the torchscript exporter, ie using the
--torchscript-onnx
flag, all the exported HF models contain aSoftmaxCrossEntropyLoss
node at the end that compares the model output with the true labels. Why is training-related ops showing up in the exported model and is there a way to disable such ops?The export command I'm using is:
The text was updated successfully, but these errors were encountered: