如何解决问题模块'tensorflow_core.contrib'没有属性'lite'?

时间:2020-02-04 05:52:50

标签: tensorflow machine-learning keras conv-neural-network

我尝试使用以下代码将.h5文件转换为.tflite文件:

converter = tf.contrib.lite.TFLiteConverter.from_keras_model_file('/drive/My Drive/FSD_modelV09A.h5')
tflite_model = converter.convert()
open("/drive/My Drive/FSD_modelV09A.tflite", "wb").write(tflite_model)

但是却收到此错误:

AttributeError: module 'tensorflow_core.contrib' has no attribute 'lite'

我正在使用Tensorflow版本1.15.0

0 个答案:

没有答案