So I have the following code snipped which works till the last line where i enter the interpreter.invoke()
input_data10 = np.expand_dims(input_text[1:1001], axis=1)
interpreter.resize_tensor_input(input_details[0]['index'], [1000, 1, 100])
interpreter.allocate_tensors()
interpreter.set_tensor(input_details[0]['index'], input_data10)
interpreter.allocate_tensors()
interpreter.invoke()
The error I am getting is this one:
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-51-7d35ed1dfe14> in <module>
----> 1 interpreter.invoke()
/usr/local/lib/python3.6/dist-packages/tensorflow/lite/python/interpreter.py in invoke(self)
538 """
539 self._ensure_safe()
--> 540 self._interpreter.Invoke()
541
542 def reset_all_variables(self):
RuntimeError: tensorflow/lite/kernels/pad.cc:79 SizeOfDimension(op_context->paddings, 0) != op_context->dims (3 != 4)Node number 21 (PAD) failed to prepare.