|
本帖最后由 kimizij 于 2019-3-9 21:39 编辑
我的pb模型可以用tf加载并正常运行,但转化模型后的 .rknn在做inference的时候,会出错,求指点
tf代码中
fpn_inner_res4_22_sum_lateral = conv(res4_22_sum,fpn_inner_res4_22_sum_lateral_w,fpn_inner_res4_22_sum_lateral_b,kernel_transpose,[1,1,1,1],False)
fpn_inner_res4_22_sum_topdown = tf.image.resize_images(fpn_inner_res5_2_sum,size = (40,60),method=tf.image.ResizeMethod.NEAREST_NEIGHBOR,align_corners=True)
fpn_inner_res4_22_sum = tf.add(fpn_inner_res4_22_sum_lateral,fpn_inner_res4_22_sum_topdown)
其中fpn_inner_res4_22_sum_lateral, fpn_inner_res4_22_sum_topdown都在转换模型时都可以正常输出,但通过tf.add 相加后,模型转换后无法inference, 报错信息如下:
-->loading model
loading model done
--> Init runtime environment
E Catch exception when init runtime!
T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 506, in rknn.api.rknn_base.RKNNBase.init_runtime
T File "rknn/api/rknn_runtime.py", line 270, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
T Exception: RKNN init failed. error code: RKNN_ERR_MODEL_INVALID
Init runtime environment failed
|
|