无法在tflite中分配张量

时间:2019-09-19 14:47:08

标签: python tensorflow tensorflow-lite

我正在尝试加载EAST的tensorflow实现的tflite版本 带有tflite的python解释器的文本检测器。当我尝试分配张量时,出现错误:

tensorflow/contrib/lite/kernels/concatenation.cc:75 t->dims->data[d] != t0->dims->data[d] (45 != 46)
Node number 78 (CONCATENATION) failed to prepare.

Failed to allocate tensors!

我在转换期间已经固定了模型的大小,即使保持选择的大小,也会出现错误。这是失败的代码示例:

from tensorflow.lite.python.interpreter import Interpreter

model = Interpreter(model_path='frozen_east_text_detection.tflite')
model.allocate_tensors()

即使我在tensorflow的github上发现了类似的问题,我也找不到任何解决方案,有人有解决方案吗?或者至少知道是什么原因造成的?

谢谢。

0 个答案:

没有答案