AttributeError:type object ‘TFLiteConverterV2 ‘has no attribute ‘form_keras_model_file ‘

Posted 17岁boy想当攻城狮

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AttributeError:type object ‘TFLiteConverterV2 ‘has no attribute ‘form_keras_model_file ‘相关的知识,希望对你有一定的参考价值。

在Tensor Flow2.0以上加载keras模型文件使用load_model

keras_model = tf_keras_models.load_model("xx.h5")

然后在调用from_keras_model转换成lite

converter = tf.lite.TFLiteConverter.from_keras_model(keras_model)

以上是关于AttributeError:type object ‘TFLiteConverterV2 ‘has no attribute ‘form_keras_model_file ‘的主要内容,如果未能解决你的问题,请参考以下文章

AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘

AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘

Python - celery 相关报错 - AttributeError: type object '_multiprocessing.win32' has no attribute

AttributeError: type object '_io.StringIO' has no attribute 'StringIO'

AttributeError:type object ‘TFLiteConverterV2 ‘has no attribute ‘form_keras_model_file ‘

AttributeError:type object ‘TFLiteConverterV2 ‘has no attribute ‘form_keras_model_file ‘