Toybrick

pytorch模型转换出错,求助!

Devin

中级会员

积分
452
楼主
发表于 2021-1-27 16:21:39    查看: 16468|回复: 2 | [复制链接]    打印 | 只看该作者
平台ubuntu18.04, rknn-toolkit1.6.0,模型是pytorch导出的torch格式,错误log日志如下:
(rk_python3.6) devin@devin:~/rknn-toolkit-master/examples/pytorch/my_res18$ python3 pytorch2rknn.py
W Verbose file path is invalid, debug info will not dump to file.
/home/devin/anaconda3/envs/rk_python3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/devin/anaconda3/envs/rk_python3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/devin/anaconda3/envs/rk_python3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/devin/anaconda3/envs/rk_python3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/devin/anaconda3/envs/rk_python3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/devin/anaconda3/envs/rk_python3.6/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
--> config model
done
--> Loading model
I Start importing pytorch...
./pt_models/adaptpool_mish.pt ********************
D import clients finished
E Catch exception when loading pytorch model: ./pt_models/adaptpool_mish.pt!
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 339, in rknn.api.rknn_base.RKNNBase.load_pytorch
E   File "rknn/base/RKNNlib/RK_nn.py", line 146, in rknn.base.RKNNlib.RK_nn.RKnn.load_pytorch
E   File "rknn/base/RKNNlib/app/importer/import_pytorch.py", line 128, in rknn.base.RKNNlib.app.importer.import_pytorch.ImportPytorch.run
E   File "rknn/base/RKNNlib/converter/convert_pytorch_new.py", line 2246, in rknn.base.RKNNlib.converter.convert_pytorch_new.convert_pytorch.load
E   File "rknn/base/RKNNlib/converter/convert_pytorch_new.py", line 34, in rknn.base.RKNNlib.converter.convert_pytorch_new._run_jit_passes
E AttributeError: module 'torch._C' has no attribute '_jit_pass_inline'
Load pytorch model failed!


回复

使用道具 举报

gsrk

新手上路

积分
32
沙发
发表于 2021-4-1 16:16:35 | 只看该作者
请问你解决了吗,遇到相同问题,如何解决的呢?
回复

使用道具 举报

慕容紫

注册会员

积分
59
板凳
发表于 2021-7-6 16:55:29 | 只看该作者
gsrk 发表于 2021-4-1 16:16
请问你解决了吗,遇到相同问题,如何解决的呢?

请问你解决了吗,遇到相同问题,如何解决的呢?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表