- Notifications
You must be signed in to change notification settings - Fork250
Introduction to generative adversarial networks, with code to accompany the O'Reilly tutorial on GANs
License
jonbruner/generative-adversarial-networks
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains code to accompanythe O'Reilly tutorial on generative adversarial networks written byJon Bruner andAdit Deshpande. Seethe original tutorial to run this code in a pre-built environment on O'Reilly's servers with cell-by-cell guidance, or run these files on your own machine.
There are three versions of our simple GAN model in this repository:
- gan-notebook.ipynb is identical to the interactive tutorial, available here so that you can run it on your own machine.
- gan-script.py is a straightforward Python script containing code drawn directly from the tutorial, to be run from the command line. Note that it doesn't print anything when it's executed, but it does send regular updates toTensorBoard so that you can track its progress.
- gan-script-fast.py is a modest refactoring of gan-script.py that runs slightly faster because more of its computations are contained in the TensorFlow graph.
In order to rungan-script.py organ-script-fast.py, you'll needTensorFlow version 1.0 or later andNumPy. In order to rungan-notebook.ipynb, you'll additionally needJupyter andmatplotlib.
If you've already got TensorFlow on your machine, then you've got NumPy and should be able to run the raw Python scripts.
The easiest way to install TensorFlow as well as NumPy, Jupyter, and matplotlib is to start with the Anaconda Python distribution.
Follow theinstallation instructions for Anaconda Python.We recommend using Python 3.6.
Follow the platform-specificTensorFlow installation instructions. Be sure to follow the "Installing with Anaconda" process, and create a Conda environment named
tensorflow.If you aren't still inside your Conda TensorFlow environment, enter it by opening your terminal and typing
source activate tensorflowDownload and unzipthis entire repository from GitHub, either interactively, or by entering
git clone https://github.com/jonbruner/generative-adversarial-networks.git
Use
cdto navigate into the top directory of the repo on your machineLaunch Jupyter by entering
jupyter notebook
and, using your browser, navigate to the URL shown in the terminal output (usuallyhttp://localhost:8888/)
About
Introduction to generative adversarial networks, with code to accompany the O'Reilly tutorial on GANs
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.