是否可以在没有原始 HDF5 文件的情况下将 Tensorflow Lite 模型量化为 8 位权重?

Is it possible to quantize a Tensorflow Lite model to 8-bit weights without the original HDF5 file?

我正在尝试使用 the edgetpu compiler 编译一个 tflite 模型以使其与 Google 的 Coral USB 密钥兼容,但是当我 运行 edgetpu_compiler the_model.tflite 我收到 Model not quantized 错误。

然后我想 quantize the tflite model 为 8 位整数格式,但我没有模型的原始 .h5 文件。

是否可以将 tflite 转换后的模型量化为 8 位格式?

@garys 不幸的是,tensorflow 没有 API 来量化 float tflite 模型。对于 post 训练量化,他们唯一的 API 是完整的张量流模型(.pb、hdf5、h5、saved_model...)-> tflite。量化过程发生在 tflite 转换期间,所以据我所知,没有办法做到这一点