V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
cralison

学习笔记 GAN001:生成式对抗网络,只需 10 步,从零开始到调试

  •  
  •   cralison · Aug 26, 2017 · 2101 views
    This topic created in 3170 days ago, the information mentioned may be changed or developed.
    生成式对抗网络(gennerative adversarial network,GAN),目前最火的非监督深度学习。一个生成网络无中生有,一个判别网络推动进化。学技术,不先着急看书看文章。先把 Demo 跑起来,顺利进入断点调试。这样就可以边学习边修改边验证,亲自下手参与调试,会比只是当个看客,更有兴趣更有成就感也更容易理解内容。

    1 、下载并安装 Anaconda。
    https://www.continuum.io/downloads

    Anaconda 的使用可以看这篇文章:
    http://www.jianshu.com/p/2f3be7781451

    2 、创建环境,指定 Python 版本

    conda create --name python36 python=3.6

    3 、使用 activate 激活环境

    source activate python36

    4 、安装依赖库

    pip install bleach certifi chardet decorator html5lib idna imageio markdown moviepy numpy olefile pillow protobuf scipy requests six tensorflow tensorflow-tensorboard tqdm urllib3 werkzeug

    5 、用 git clone DCGAN-tensorflow 源码

    git clone https://github.com/carpedm20/DCGAN-tensorflow.git

    6 、进入 DCGAN-tensorflow 目录

    cd XXX/DCGAN-tensorflow

    7 、下载 mnist 数据集

    python download.py mnist

    8 、训练模型

    python main.py --dataset mnist --input_height=28 --output_height=28 --train

    9 、测试模型

    python main.py --dataset mnist --input_height=28 --output_height=28

    10 、断点调试



    欢迎付费咨询(150 元每小时),我的微信:qingxingfengzi
    ivechan
        1
    ivechan  
       Sep 13, 2017
    毫无意。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2129 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 00:40 · PVG 08:40 · LAX 17:40 · JFK 20:40
    ♥ Do have faith in what you're doing.