【发布时间】:2021-09-06 04:56:15
【问题描述】:
我已将 tf 模型转换为 tflite,并在此过程中应用了量化,但我无法加载它。当我尝试执行interpreter = tf.lite.Interpreter(tflite_model_path) 时出现错误,错误消息是:
ValueError: Did not get operators or tensors in subgraph 1.
同样在量化过程中,我的模型中的每个密集层都收到了很多这样的 INFO 消息:
2021-09-06 04:38:40.879693: I tensorflow/lite/tools/optimize/quantize_weights.cc:217] Skipping quantization of tensor bert_token_clssfification/classifier/Tensordot/Shape that is not type float.
这些消息让我非常困惑,因为我确信这些权重是 float32 类型的。任何想法我做错了什么?谢谢!
【问题讨论】:
标签: tensorflow tensorflow-lite quantization