- import numpy as np
- import re
- import math
- import random
- import cv2
- from rknn.api import RKNN
- rknn = RKNN()
- rknn.config(mean_values=[128,128,128,128], std_values=[0,0,0,0])
- rknn.load_tensorflow(tf_pb='./foods26_frozen.pb',
- inputs=['input'],
- outputs=['InceptionV3/Predictions/Reshape_1'],
- input_size_list=[[299, 299, 3]])
- rknn.build(do_quantization=True, dataset='./dataset.txt')
- rknn.export_rknn('./test.rknn')
复制代码 上面是转化代码,直接报错
结果build时报错:
E build: Catch exception when building RKNN model!
E build: Traceback (most recent call last):
E build: File "rknn/api/rknn_base.py", line 2254, in rknn.api.rknn_base.RKNNBase.build
E build: TypeError: list indices must be integers or slices, not str 看意思是list必须是整数,而不是str,但是我看了一下数组都是整数,到底是怎么回事
|