MiniBullLab/easy_ai

pytorch版本升级探索

Closed this issue · 10 comments

1.推荐版本pytorch1.5或者pytorch1.6

@foww-0001 测试的时候测以下这连个版本

主要测试easy_tools上运行是否有问题。

分类转换模型失败,报错如下:

opened session 6536
Traceback (most recent call last):
  File "/usr/local/amba-cv-tools-2.1.7-20190815.ubuntu-18.04/cv2/tv2/release/AmbaCnnUtils/cv2.1.7.408/parser/onnx/onnxparser.py", line 84, in <module>
    onnx_main()
  File "/usr/local/amba-cv-tools-2.1.7-20190815.ubuntu-18.04/cv2/tv2/release/AmbaCnnUtils/cv2.1.7.408/parser/onnx/onnxparser.py", line 77, in onnx_main
    onnxToAmbaCnn = GraphBuilder(params, prim_composer, json_retcode, onnx_factory)
  File "/usr/local/amba-cv-tools-2.1.7-20190815.ubuntu-18.04/cv2/tv2/release/AmbaCnnUtils/cv2.1.7.408/parser/onnx/onnx_scanner.py", line 93, in __init__
    self.__init_builder()
  File "/usr/local/amba-cv-tools-2.1.7-20190815.ubuntu-18.04/cv2/tv2/release/AmbaCnnUtils/cv2.1.7.408/parser/onnx/onnx_scanner.py", line 182, in __init_builder
    self.__init_shapes()
  File "/usr/local/amba-cv-tools-2.1.7-20190815.ubuntu-18.04/cv2/tv2/release/AmbaCnnUtils/cv2.1.7.408/parser/onnx/onnx_scanner.py", line 161, in __init_shapes
    self.caffe2Rep = backend.prepare(self.OnnxModel, device='CPU')
  File "/home/wfw/workspace/Test/TestENV/lib/python3.6/site-packages/caffe2/python/onnx/backend.py", line 713, in prepare
    init_net, predict_net = cls._onnx_model_to_caffe2_net(model, device, opset_version, False)
  File "/home/wfw/workspace/Test/TestENV/lib/python3.6/site-packages/caffe2/python/onnx/backend.py", line 876, in _onnx_model_to_caffe2_net
    onnx_model = onnx.utils.polish_model(onnx_model)
  File "/home/wfw/workspace/Test/TestENV/lib/python3.6/site-packages/onnx/utils.py", line 21, in polish_model
    model = onnx.optimizer.optimize(model)
  File "/home/wfw/workspace/Test/TestENV/lib/python3.6/site-packages/onnx/optimizer.py", line 55, in optimize
    optimized_model_str = C.optimize(model_str, passes)
IndexError: _Map_base::at
Error: input file 'classnet.vas' is missing
Using cavalry_gen version latest
cp: 无法获取'/home/wfw/workspace/Test/easy_ai/.easy_log/out/cavalry/classnet.bin' 的文件状态(stat): 没有那个文件或目录

使用amba2.2.1版本,软件在百度网盘

pytorch1.6+amba2.2.1去尝试一下。

探索成功后,把docker中torch的版本替换掉。

GPU3090 pytorch1.7.1可用

pytorch1.6的环境待测试。

使用torch==1.6.0和torchvision==0.7.0