我尝试使用以下代码将.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