- # pre-process config
- print('--> config model')
- rknn.config(channel_mean_value='127.5 127.5 127.5 128', reorder_channel='0 1 2', quantized_dtype='asymmetric_quantized-u8')
- print('done')
- # Load tflite model
- print('--> Loading model')
- ret = rknn.load_tensorflow(tf_pb='./ssd_mobilenet_v2.pb',
- inputs=['FeatureExtractor/MobilenetV2/MobilenetV2/input'],
- outputs=['concat_1', 'concat'],
- input_size_list=[[300,300,3]],
- predef_file=None)
- if ret != 0:
- print('Load model failed!')
- exit(ret)
- print('done')
-
- ret = rknn.build(do_quantization=True, dataset='dataset.txt', rknn_batch_size=1)
-
- rknn_file = 'ssd_mobilenet_v2.pb-def-quant.rknn'
- print('export:', rknn_file, '...')
- rknn.export_rknn(rknn_file)
复制代码
jefferyzhang 发表于 2019-12-13 09:12
1. 我们再次确认过,val2017目录下有200张图,请检查你自己下的全不全。
2. 这个报错的原因和图片数量没有 ...
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |