电脑配置:
tensorflow_gpu-1.4.0
keras 2.0.8
numpy 1.16.0
python 3.6
1.问题描述:
在TensorFlow教程:电影评论文本分类中 按照给定语句model = keras.Sequential()在电脑中跑的时候报错:
AttributeError: module ‘keras’ has no attribute 'Sequential’
解决方法:
将model = keras.Sequential()替换成model=keras.models.Sequential()
可成功运行。
(改成model=tf.contrib.keras.models.Sequential()也可成功运行)
参考自:
2.问题描述
安装matplotlib 时使用镜像源忘了加上 -i ,报错:
ERROR: Cannot determine archive format of :XXXXXXXXXX
解决办法:添加 -i 即可
即输入命令pip install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib