Toybrick

标题: onnx转换rknn出错 [打印本页]

作者: yaowei    时间: 2019-5-6 14:21
标题: onnx转换rknn出错
代码:
  1. from rknn.api import RKNN

  2. rknn = RKNN()

  3. rknn.config(channel_mean_value='0 0 0 255', reorder_channel='0 1 2')

  4. print('--> Loading model')
  5. rknn.load_onnx(model='./xxx.onnx')
  6. print('done')

  7. print('--> Building model')
  8. rknn.build(do_quantization=False)
  9. print('done')

  10. rknn.export_rknn('./zzz.rknn')

  11. rknn.release()
复制代码


作者: yaowei    时间: 2019-5-6 14:22
错误:
  1. --> Loading model
  2. done
  3. --> Building model
  4. E Catch exception when building RKNN model!
  5. T Traceback (most recent call last):
  6. T   File "rknn/api/rknn_base.py", line 476, in rknn.api.rknn_base.RKNNBase.build
  7. T   File "rknn/api/rknn_base.py", line 405, in rknn.api.rknn_base.RKNNBase._build
  8. T   File "rknn/base/ovxconfiggenerator.py", line 177, in rknn.base.ovxconfiggenerator.generate_vx_config_from_files
  9. T   File "rknn/base/RKNNlib/app/helper/striphelper.py", line 47, in rknn.base.RKNNlib.app.helper.striphelper.StripHelper.build_network_2
  10. T   File "rknn/base/RKNNlib/RKNNnet.py", line 116, in rknn.base.RKNNlib.RKNNnet.RKNNNet.load_file
  11. T   File "rknn/base/RKNNlib/RKNNnet.py", line 379, in rknn.base.RKNNlib.RKNNnet.RKNNNet.load_data
  12. T   File "rknn/base/RKNNlib/RKNNnet.py", line 391, in rknn.base.RKNNlib.RKNNnet.RKNNNet._load_old_data
  13. T   File "rknn/base/RKNNlib/RKNNnet.py", line 392, in rknn.base.RKNNlib.RKNNnet.RKNNNet._load_old_data
  14. T   File "/home/yaowei/.local/lib/python3.6/site-packages/numpy/lib/npyio.py", line 447, in load
  15. T     pickle_kwargs=pickle_kwargs)
  16. T   File "/home/yaowei/.local/lib/python3.6/site-packages/numpy/lib/format.py", line 692, in read_array
  17. T     raise ValueError("Object arrays cannot be loaded when "
  18. T ValueError: Object arrays cannot be loaded when allow_pickle=False
  19. done
  20. E RKNN model data is None, please load model first!
复制代码



作者: weidao    时间: 2019-5-13 15:14
解决了吗,老铁?
作者: 程子    时间: 2019-5-13 15:42
hisping 发表于 2019-5-13 15:23
把numpy回退到1.16.2或更低版本,最新的1.16.3会出问题;https://blog.csdn.net/rookie_wei/article/detail ...

据说已经修复。
http://t.rock-chips.com/forum.ph ... &extra=page%3D1




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