Skip to content
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

ONNX export mode is set to TrainingMode.EVAL, but operator 'instance_norm' is set to train=True #727

Open
edwardnguyen1705 opened this issue Jun 18, 2024 · 0 comments

Comments

@edwardnguyen1705
Copy link

Dear @L1aoXingyu ,

Thanks for sharing a great work. I have been using this repo to train person embedding models.

When I convert to onnx, I observe a WARNING

$  python3 tools/deploy/onnx_export.py --config-file path/to/cfg_file

/usr/local/lib/python3.10/dist-packages/torch/onnx/symbolic_helper.py:1515: UserWarning: ONNX export mode is set to TrainingMode.EVAL, but operator 'instance_norm' is set to train=True. Exporting with train=True.

I also try torch2trt, and I observe the same behavior. Moreover, the difference between outputs of pytorch and tensorrt are quite different on a person reid dataset. I attach the scripts to produce the results.
torch2trt.zip
delta_y

I have googled and it shows that there are many persons having the same issue, I have tried some workarounds but they did not work, here is an example.

Have encountered this issue and figured out a way to tackle this?
Thanks for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant