【发布时间】:2018-12-31 07:20:30
【问题描述】:
我正在尝试使用 keras 进行图像分类。我想为我的项目加载一个已经训练好的模型(VGG16)。但是当我跑步时
from keras.applications.vgg16 import VGG16
我得到一个错误。
ImportError: cannot import name 'abs'
我使用以下方法重新安装了 tensorflow 和 keras:
pip install --ignore-installed --upgrade tensorflow
conda install -c conda-forge keras
因为我发现了一些建议,尽管它与 tfp 而不是 VGG16 相关,但重新安装可能对 here 有所帮助。
有人可以帮帮我吗?为什么我会收到此错误,我该如何解决?
操作系统:Windows TensorFlow 和 keras 安装在 CPU 上
【问题讨论】:
标签: python tensorflow installation keras pip