Toybrick

运行官方mobilenet-ssd转换失败

86667780

注册会员

积分
83
楼主
发表于 2020-5-6 23:12:35    查看: 8917|回复: 1 | [复制链接]    打印 | 只看该作者
环境
1:tensorflow:1.14.0
2:rknn-api:1.3.2
     rknn-drv:  1.3.1
3.  系统Debian10
运行板子里/usr/share/rknn/mobilenet-ssd/ssd.py时出错(我在运行其他几个模型时也是相同的错误)
报错信息
  1. --> Loading model
  2. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/ceil.py:10: The name tf.ceil is deprecated. Please use tf.math.ceil instead.

  3. W:tensorflow:From /home/toybrick/.local/lib/python3.7/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.

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

  11. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/log.py:10: The name tf.log is deprecated. Please use tf.math.log instead.

  12. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/random_normal.py:9: The name tf.random_normal is deprecated. Please use tf.random.normal instead.

  13. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/random_uniform.py:9: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead.

  14. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/onnx_tf/handlers/backend/upsample.py:13: The name tf.image.resize_images is deprecated. Please use tf.image.resize instead.

  15. /home/toybrick/.local/lib/python3.7/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.
  16.   warnings.warn(message)
  17. W:tensorflow:From /home/toybrick/.local/lib/python3.7/site-packages/rknn/api/rknn.py:67: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
  18. Instructions for updating:
  19. Use `tf.compat.v1.graph_util.extract_sub_graph`
  20. E Catch exception when loading tensorflow model: ./ssd_mobilenet_v1_coco_2017_11_17.pb!
  21. E Traceback (most recent call last):
  22. E   File "rknn/api/rknn_base.py", line 215, in rknn.api.rknn_base.RKNNBase.load_tensorflow
  23. E   File "rknn/base/RKNNlib/converter/convert_tf.py", line 527, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.pre_process
  24. E   File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 96, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.pre_proces
  25. E   File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 555, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.import_tf_ruler_module
  26. E   File "/home/toybrick/.local/lib/python3.7/site-packages/rknn/base/RKNNlib/converter/tfruler/__init__.py", line 2, in <module>
  27. E     from .tf_ruler_generate import r_add_n_template, r_concatv2_template, r_split_template
  28. E ImportError: cannot import name 'r_add_n_template' from 'tfruler.tf_ruler_generate' (/home/toybrick/.local/lib/python3.7/site-packages/rknn/base/RKNNlib/converter/tfruler/tf_ruler_generate.cpython-37m-aarch64-linux-gnu.so)
  29. done
  30. --> Building model
  31. Traceback (most recent call last):
  32.   File "ssd.py", line 75, in <module>
  33.     rknn.build(do_quantization=True, dataset='./dataset.txt')
  34.   File "/home/toybrick/.local/lib/python3.7/site-packages/rknn/api/rknn.py", line 222, in build
  35.     inputs = self.rknn_base.net.get_input_layers()
  36. AttributeError: 'NoneType' object has no attribute 'get_input_layers'
复制代码


回复

使用道具 举报

leok

版主

积分
894
沙发
发表于 2020-5-12 18:04:05 | 只看该作者
板子里头的rknn toolkit没有转换功能;
请在宿主机上,如ubuntu上进行模型转换。
回复

使用道具 举报

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

本版积分规则

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


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