Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Tensorflow 如何将TFLite模型转换为量化TFLite模型?_Tensorflow_Model_Converters_Quantization - Fatal编程技术网

Tensorflow 如何将TFLite模型转换为量化TFLite模型?

Tensorflow 如何将TFLite模型转换为量化TFLite模型?,tensorflow,model,converters,quantization,Tensorflow,Model,Converters,Quantization,我有一个tflite文件,我想量化它 如何将TFLite模型转换为量化TFLite模型?根据您使用的是keras还是tfhub,您可以简单地执行以下操作[这是假设TF模型没有量化意识]: converter = tf.lite.TFLiteConverter.from_keras_model(non_qat_model) converter.optimizations = [tf.lite.Optimize.DEFAULT] quantized_tflite_model = converter.

我有一个tflite文件,我想量化它


如何将TFLite模型转换为量化TFLite模型?

根据您使用的是keras还是tfhub,您可以简单地执行以下操作[这是假设TF模型没有量化意识]:

converter = tf.lite.TFLiteConverter.from_keras_model(non_qat_model)
converter.optimizations = [tf.lite.Optimize.DEFAULT]
quantized_tflite_model = converter.convert()
您可以在此处进一步参考链接:

输入是保存的模型,而不是tflite模型