文章目录
写在最前面:解决方法是升级tensorflow版本,重新生成tflite。
0. 背景
今天遇到了这么一个问题:
File "***/scripts/tflite/schema.py", line 9366, in Tensors
x = self._tab.Indirect(x)
File "***/anaconda3/lib/python3.8/site-packages/flatbuffers/table.py", line 46, in Indirect
return off + encode.Get(N.UOffsetTFlags.packer_type, self.Bytes, off)
File "***/anaconda3/lib/python3.8/site-packages/flatbuffers/encode.py", line 26, in Get
return packer_type.unpack_from(memoryview_type(buf), head)[0]
struct.error: unpack_from requires a buffer of at least 1574732 bytes for unpacking