原因:pytorch-1.0.1不支持reshape操作
解决:~/anaconda3/envs/py36/lib/python3.6/site-packages/torch/onnx/symbolic.py
在该文件中添加代码
def reshape(g, self, shape): return view(g, self, shape) def reshape_as(g, self, other): shape = g.op(‘Shape‘, other) return reshape(g, self, shape)
原文:https://www.cnblogs.com/haiyang21/p/11543951.html