- rknn = RKNN(verbose=True, verbose_file='./test1.log')
- # Config for Model Input PreProcess
- rknn.config(channel_mean_value='0 0 0 1', reorder_channel='0 1 2',target_platform=['rv1126'])
- print('config done')
- # load tensorflow model
- print('--> Loading model')
- rknn.load_tensorflow(tf_pb='./20180402-114759.pb',
- inputs=['input', 'phase_train'],
- outputs=['embeddings'],
- input_size_list=[[INPUT_SIZE, INPUT_SIZE, 3],[1]])
- print('done')
- # Build Model
- print('--> Building model')
- # rknn.build(do_quantization=False,do_quantization=True, dataset='dataset.txt')
- rknn.build(do_quantization=False)
- print('done')
- # Export RKNN Model
- rknn.export_rknn('./facenet_Reshape_1_two.rknn')
- rknn.release()
复制代码
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |