【发布时间】:2020-04-09 17:12:20
【问题描述】:
我尝试加载我在本地机器中创建的模型,所以首先我将我的模型(.h5)上传到谷歌驱动器,然后我使用以下代码在 colab 中访问我的模型
from google.colab import drive
drive.mount('/content/drive')
然后我尝试使用以下代码
from keras.models import load_model
classifier = load_model('/content/drive/My Drive/Colab Notebooks/face_shape_recog_model.h5')
运行上面的代码后出现以下错误
AttributeError: module 'tensorflow' has no attribute 'placeholder'
我尝试卸载并安装 tensorflow 和 keras,但仍然面临同样的问题 我还尝试了github issue
中提到的解决方案谢谢你
【问题讨论】:
标签: tensorflow machine-learning keras deep-learning google-colaboratory