Skip to content

Fix tensor to int conversion warning during ONNX export tracing#10

Open
jaggernaut007 wants to merge 1 commit intoanibali:masterfrom
jaggernaut007:patch-3
Open

Fix tensor to int conversion warning during ONNX export tracing#10
jaggernaut007 wants to merge 1 commit intoanibali:masterfrom
jaggernaut007:patch-3

Conversation

@jaggernaut007
Copy link
Copy Markdown
Contributor

No description provided.

@anibali anibali added the blocked Requires something else to change first label May 17, 2020
@anibali
Copy link
Copy Markdown
Owner

anibali commented May 17, 2020

For future reference, this PR fixes the following warning during tracing for ONNX model export:

Converting a tensor to a Python integer might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!

However, due to pytorch/pytorch#27551 this change can't be made until we upgrade to PyTorch 1.5.0 otherwise tracing (and hence ONNX export) breaks completely.

@anibali anibali changed the title fix trace issue Fix tensor to int conversion warning during ONNX export tracing May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Requires something else to change first

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants