Missing key(s) in state_dict

I’m sorry! It’s not working on 0.4.0 and master. I’ve mixed up the files.
Let me check it again and get back to you.

1 Like

I debugged the code a bit and apparently ONNX is throwing the error when pack_padded_sequence is used.
Have a look at these docs.
At _symbolic_pack_padded_sequence, there is a statement:

There currently is no PackPadded operator in ONNX. We rely on an
optimization pass to remove this later. It is an error if all
PackPadded operators cannot be optimized out.

I’m not sure, as I haven’t used ONNX a lot, but maybe you could file an issue at the ONNX github.

1 Like

I’ll make sure to post my issue on the ONNX github repo. If your code sample worked may I take a look at the exported onnx model ‘test.proto’ in onnx/caffe format?

Unfortunately it didn’t work. I’ll edit the above post with the warning.