Skip to content

✨对抗网络的Keras实现,本仓库仅用作记录一些跑起来过程中遇到的问题及解决办法,本次主要目的是跑起来其中的 CGAN,其他的项目遇到的问题类似,希望能对你有所帮助。

License

Notifications You must be signed in to change notification settings

kongzue/Keras-GAN

 
 

Repository files navigation

关于此项目

请注意本库不接受 issues,仅用作记录跑起来 Keras-GAN 过程中遇到的一些问题及解决方法。

重要:首先请确保网络正常访问所有需要的库的服务器。

本次主要目的是跑起来其中的 CGAN,其他的项目遇到的问题类似,希望能对你有所帮助。

原库使用方法和提交 issues 请访问:eriklindernoren/Keras-GAN

关于运行Keras-GAN的几个问题记录

记录者 @kongzue

1. 需要keras-contrib,但是keras-contrib在官方仓库没有编译好的,需要手动拉取编译,方法是前往 https://github.com/keras-team/keras-contrib.git 下载到本地后

git clone https://www.github.com/keras-team/keras-contrib.git
cd keras-contrib
python setup.py install

2. tensorflow 安装遇到问题:

PackagesNotFoundError: The following packages are not available from current channels:
  -tensorflow

输入:

anaconda show  free/tensorflow

按照提示复制返回的:

conda install --channel https://conda.anaconda.org/free tensorflow

回车安装。

Git相关,其一是配置全局代理:

git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080

其次是配置禁用 SSL 验证

git config --global http.sslVerify “false”

3. tensorflow必须在python3.6以下安装,我的环境是Python3.6

image

4. 会遇到无法连接到亚马逊服务器amazonaws.com

需要手动下载 mnist.npz

https://s3.amazonaws.com/img-datasets/mnist.npz

全局搜索(双击shift):"minst.load_data"

image

然后找到并修改其 path 信息,系统提示只读的话选择强行修改:

image

指向你刚刚下载的mnist.npz文件

5. 遇到错误:tensorflow.python.framework.errors_impl.FailedPreconditionError: Error while...

需要修改代码

image

由原来的

from keras.optimizers import Adam

改为:

from tensorflow.keras.optimizers import Adam

运行成功。

image

About

✨对抗网络的Keras实现,本仓库仅用作记录一些跑起来过程中遇到的问题及解决办法,本次主要目的是跑起来其中的 CGAN,其他的项目遇到的问题类似,希望能对你有所帮助。

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Python 99.2%
  • Shell 0.8%