leok 发表于 2020-8-6 16:00
onnx版本确认切换到1.4.1
- torch.onnx.export(net, input, 'netCRNN_rknn.onnx', export_params=True, verbose=True, opset_version=9)
复制代码
- # Create RKNN object
- rknn = RKNN(verbose=True)
- # pre-process config
- print('--> config model')
- rknn.config(channel_mean_value='0 0 0 1', reorder_channel='0 1 2')
- print('done')
- # Load onnx model
- print('--> Loading model')
- ret = rknn.load_onnx(model='../netCRNN_rknn.onnx')
- if ret != 0:
- print('Load model failed!')
- exit(ret)
- print('done')
复制代码
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |