我的模型输入[320000,1],在模型内部做reshape到(1600,200,1)后接vgg处理,这样转换之后pb模型可以正常使用,但rknn模型inference时候就报错,而且模型转换的log没有error或warning,rknn-toolkit版本是0.9.9。 E Catch exception when init model! T Traceback (most recent call last): T File "rknn/api/rknn_base.py", line 625, in rknn.api.rknn_base.RKNNBase.inference T File "rknn/api/rknn_runtime.py", line 275, in rknn.api.rknn_runtime.RKNNRuntime.build_graph T Exception: RKNN init failed. error code: RKNN_ERR_MODEL_INVALID 模型输入reshape代码 input_data = Input(name='the_input', shape=(self.INPUT_SIZE, 1), dtype='float32') input_wavImage = Reshape((self.AUDIO_LENGTH, self.AUDIO_FEATURE_LENGTH, 1), name='Reshape')(input_data) rknn模型转换代码 rknn.config() # Load TensorFlow Model print('--> Loading model') rknn.load_tensorflow(tf_pb='./model.pb', inputs=['the_input'], outputs=['Activation0/truediv'], input_size_list=[[320000, 1]]) |
Hhhhlnlnlnh 发表于 2019-5-20 14:35
自顶! 会是rknn toolkit 0.9.9的问题吗?不知道升级会不会有用
欢迎光临 Toybrick (https://t.rock-chips.com/) | Powered by Discuz! X3.3 |