Toybrick

标题: rknn1.3.0 转换 pytorch模型出错 [打印本页]

作者: teslawho    时间: 2020-3-27 11:18
标题: rknn1.3.0 转换 pytorch模型出错
本帖最后由 teslawho 于 2020-3-27 20:42 编辑

[attach]938[/attach]

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!


作者: jefferyzhang    时间: 2020-3-28 11:17
你的pytorch版本是多少?




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3