Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
LSTM from pytorch to tensorflow: "Squeeze" messes up rank #1383
Hi! I'm trying to export a pytorch (installed from master branch) LSTM to ONNX (1.3.0), and then to import it into tensorflow (tf-nightly).
Exporting works. The relevant graph bit looks like
Inspecting said file after
So far so good. Unfortunately, importing with
Any idea what's going on here?
Thanks a bunch!
Ok, I installed (in a fresh conda environment) tf-nightly, onnx from source, and onnx-tf from source; the graph after
The only MatMul layer in the graph is towards the end, where we have
So I dug a little deeper; the master branch of onnx-tf still sais it only works with firstname.lastname@example.org, so I installed that version with
Any thoughts? Seems like we almost got to the root of the problem :) and I appreciate your help, thanks a lot!
Ok, I fixed this the following way:
instead of calling my model with a batch size of 1, I don't give it a batch at all, just a single vector.
Thanks a lot for your help anyways! If this is a bug/something to be improved in ONNX let me know if I can be of help.