- from rknn.api import RKNN
- rknn = RKNN()
- rknn.config(channel_mean_value='0 0 0 255', reorder_channel='0 1 2')
- print('--> Loading model')
- rknn.load_onnx(model='./xxx.onnx')
- print('done')
- print('--> Building model')
- rknn.build(do_quantization=False)
- print('done')
- rknn.export_rknn('./zzz.rknn')
- rknn.release()
复制代码
- --> Loading model
- done
- --> Building model
- E Catch exception when building RKNN model!
- T Traceback (most recent call last):
- T File "rknn/api/rknn_base.py", line 476, in rknn.api.rknn_base.RKNNBase.build
- T File "rknn/api/rknn_base.py", line 405, in rknn.api.rknn_base.RKNNBase._build
- T File "rknn/base/ovxconfiggenerator.py", line 177, in rknn.base.ovxconfiggenerator.generate_vx_config_from_files
- T File "rknn/base/RKNNlib/app/helper/striphelper.py", line 47, in rknn.base.RKNNlib.app.helper.striphelper.StripHelper.build_network_2
- T File "rknn/base/RKNNlib/RKNNnet.py", line 116, in rknn.base.RKNNlib.RKNNnet.RKNNNet.load_file
- T File "rknn/base/RKNNlib/RKNNnet.py", line 379, in rknn.base.RKNNlib.RKNNnet.RKNNNet.load_data
- T File "rknn/base/RKNNlib/RKNNnet.py", line 391, in rknn.base.RKNNlib.RKNNnet.RKNNNet._load_old_data
- T File "rknn/base/RKNNlib/RKNNnet.py", line 392, in rknn.base.RKNNlib.RKNNnet.RKNNNet._load_old_data
- T File "/home/yaowei/.local/lib/python3.6/site-packages/numpy/lib/npyio.py", line 447, in load
- T pickle_kwargs=pickle_kwargs)
- T File "/home/yaowei/.local/lib/python3.6/site-packages/numpy/lib/format.py", line 692, in read_array
- T raise ValueError("Object arrays cannot be loaded when "
- T ValueError: Object arrays cannot be loaded when allow_pickle=False
- done
- E RKNN model data is None, please load model first!
复制代码
hisping 发表于 2019-5-13 15:23
把numpy回退到1.16.2或更低版本,最新的1.16.3会出问题;https://blog.csdn.net/rookie_wei/article/detail ...
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |