Bug in pytorch 1.1:
/usr/local/lib/python3.5/dist-packages/torch/nn/functional.py:2539: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/torch/onnx/__init__.py", line 19, in _export
result = utils._export(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/torch/onnx/utils.py", line 363, in _export
_retain_param_name, do_constant_folding)
File "/usr/local/lib/python3.5/dist-packages/torch/onnx/utils.py", line 278, in _model_to_graph
_disable_torch_constant_prop=_disable_torch_constant_prop)
File "/usr/local/lib

在Pytorch 1.1版本中,尝试将模型转换为ONNX格式时遇到一个错误,具体是由于默认的upsampling行为改变导致。错误提示建议在upsample操作中指定align_corners=True。解决此问题的方法是回退到Pytorch 1.0版本。通过直接安装指定版本的Pytorch和torchvision,可以避免因版本不兼容而重新安装高版本Pytorch的问题。
3434

被折叠的 条评论
为什么被折叠?



