# torch模型导出到onnx问题 expected 1 dims but tensor has 2

expected 1 dims but tensor has 2

torch 1.5.0 must be used for the export because the following error occurs intorch 1.6.0 caused by the internal optimization process.
File “/usr/local/lib/python3.7/site-packages/torch/onnx/utils.py”, line 409, in _model_to_graph
export_onnx_opset_version)