This repository was archived by the owner on Aug 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 197
This repository was archived by the owner on Aug 1, 2023. It is now read-only.
ONNX export not working #403
Copy link
Copy link
Open
Description
pytorch_translate/examples/export_iwslt14.sh
This example doesn't work for me.
Would you be able to help me to run the example script?
I tried to fix the errors one by one, by removing parameters, but couldn't succeed to export.
- onnx_component_export.py: error: unrecognized arguments: --batched-beam
- File "/data/repos/translate/pytorch_translate/rnn.py", line 526, in build_single_decoder
fp16=args.fp16,
AttributeError: 'Namespace' object has no attribute 'fp16' - Exception has occurred: RuntimeError
Error(s) in loading state_dict for RNNModel: Missing key(s) in state_dict: "encoder.bilstm.layers.0.weight_ih_l0", "encoder.bilstm.layers.0.weight_hh_l0", "encoder.bilstm.layers.0.bias_ih_l0", "encoder.bilstm.layers.0.bias_hh_l0", "encoder.bilstm.layers.0.weight_ih_l0_reverse", "encoder.bilstm.layers.0.weight_hh_l0_reverse", "encoder.bilstm.layers.0.bias_ih_l0_reverse", "encoder.bilstm.layers.0.bias_hh_l0_reverse", "encoder.bilstm.layers.1.weight_ih_l0", "encoder.bilstm.layers.1.weight_hh_l0", "encoder.bilstm.layers.1.bias_ih_l0", "encoder.bilstm.layers.1.bias_hh_l0". Unexpected key(s) in state_dict: "encoder.layers.0.weight_ih_l0", "encoder.layers.0.weight_hh_l0", "encoder.layers.0.bias_ih_l0", "encoder.layers.0.bias_hh_l0", "encoder.layers.0.weight_ih_l0_reverse", "encoder.layers.0.weight_hh_l0_reverse", "encoder.layers.0.bias_ih_l0_reverse", "encoder.layers.0.bias_hh_l0_reverse", "encoder.layers.1.weight_ih_l0", "encoder.layers.1.weight_hh_l0", "encoder.layers.1.bias_ih_l0", "encoder.layers.1.bias_hh_l0".
File "\opt\conda\lib\python3.6\site-packages\torch\nn\modules\module.py", line 771, in load_state_dict
File "\opt\conda\lib\python3.6\site-packages\fairseq\models\fairseq_model.py", line 66, in load_state_dict
File "D:\repos\translate\pytorch_translate\ensemble_export.py", line 122, in load_models_from_checkpoints
File "D:\repos\translate\pytorch_translate\ensemble_export.py", line 414, in build_from_checkpoints
File "D:\repos\translate\pytorch_translate\onnx_component_export.py", line 116, in export
File "D:\repos\translate\pytorch_translate\onnx_component_export.py", line 88, in main
File "D:\repos\translate\pytorch_translate\onnx_component_export.py", line 156, in
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels