Toybrick

rknn1.3.0 转换 pytorch模型出错

teslawho

注册会员

积分
177
楼主
发表于 2020-3-27 11:18:24    查看: 8600|回复: 1 | [复制链接]    打印 | 只看该作者
本帖最后由 teslawho 于 2020-3-27 20:42 编辑



rknn1.3.0 转换 pytorch模型出错,请问这是什么原因?

(rknn130) H:\Desktop\rknn\1\rknn-toolkit-v1.3.0\examples\pytorch\resnet18>python test.py
--> config model
done
--> Loading model
W:tensorflow:From G:\Anaconda\Anaconda\envs\rknn130\lib\site-packages\onnx_tf\handlers\backend\ceil.py:10: The name tf.ceil is deprecated. Please use tf.math.ceil instead.

W:tensorflow:From G:\Anaconda\Anaconda\envs\rknn130\lib\site-packages\onnx_tf\handlers\backend\depth_to_space.py:12: The name tf.depth_to_space is deprecated. Please use tf.compat.v1.depth_to_space instead.

W:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/co ... 7-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

W:tensorflow:From G:\Anaconda\Anaconda\envs\rknn130\lib\site-packages\onnx_tf\handlers\backend\log.py:10: The name tf.log is deprecated. Please use tf.math.log instead.

W:tensorflow:From G:\Anaconda\Anaconda\envs\rknn130\lib\site-packages\onnx_tf\handlers\backend\random_normal.py:9: The name tf.random_normal is deprecated. Please use tf.random.normal instead.

W:tensorflow:From G:\Anaconda\Anaconda\envs\rknn130\lib\site-packages\onnx_tf\handlers\backend\random_uniform.py:9: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

W:tensorflow:From G:\Anaconda\Anaconda\envs\rknn130\lib\site-packages\onnx_tf\handlers\backend\upsample.py:13: The name tf.image.resize_images is deprecated. Please use tf.image.resize instead.

G:\Anaconda\Anaconda\envs\rknn130\lib\site-packages\onnx_tf\common\__init__.py:87: UserWarning: FrontendHandler.get_outputs_names is deprecated. It will be removed in future release.. Use node.outputs instead.
  warnings.warn(message)
./yolov3-spp.pt ********************
E Catch exception when loading pytorch model: ./yolov3-spp.pt!
E Traceback (most recent call last):
E   File "rknn\api\rknn_base.py", line 567, in rknn.api.rknn_base.RKNNBase.load_pytorch
E   File "rknn\base\RKNNlib\app\importer\import_pytorch.py", line 95, in rknn.base.RKNNlib.app.importer.import_pytorch.ImportPytorch.run
E   File "rknn\base\RKNNlib\converter\convert_pytorch.py", line 499, in rknn.base.RKNNlib.converter.convert_pytorch.convert_pytorch.__init__
E   File "C:\Users\mm\AppData\Roaming\Python\Python36\site-packages\torch\jit\__init__.py", line 162, in load
E     cpp_module = torch._C.import_ir_module(cu, f, map_location, _extra_files)
E RuntimeError: [enforce fail at ..\caffe2\serialize\inline_container.cc:137] . PytorchStreamReader failed reading zip archive: failed finding central directory
E (no backtrace available)
Load pytorch model failed!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

jefferyzhang

版主

积分
13578
沙发
发表于 2020-3-28 11:17:29 | 只看该作者
你的pytorch版本是多少?
回复

使用道具 举报

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

本版积分规则

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


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