You've done all the hard work! No, really, you have. It's a fairly simple endeavor to run the code if you don't have any translation errors in the code. Essentially, you follow a few simple steps to run your GAN:
- Run the following command in the root folder of your repository:
sudo ./run.sh
- You should see the following output in the Terminal once everything is working correctly:
username@username-comp:~/full-gan$ sudo ./run.sh
[sudo] password for username:
Sending build context to Docker daemon 3.998MB
Step 1/3 : FROM base_image
---> c398836f2b23
Step 2/3 : RUN apt install -y python3-pydot python-pydot-ng graphviz
---> Using cache
---> 37424cd81385
Step 3/3 : ADD . /
---> c91a0189d9c1
Successfully built c91a0189d9c1
Successfully tagged ch3:latest
access control disabled, clients can connect from any host
################# Model Summaries
################# Download MNIST
################# Tensorflow connecting to the GPU
Epoch: 0, [Discriminator :: Loss: 0.7186179], [ Generator :: Loss:
0.7297293]
Epoch: 1, [Discriminator :: Loss: 0.39331502], [ Generator :: Loss:
0.7450044]
Epoch: 2, [Discriminator :: Loss: 0.3295707], [ Generator :: Loss:
0.8133272]
Epoch: 3, [Discriminator :: Loss: 0.29371032], [ Generator :: Loss:
0.8316293]
Epoch: 4, [Discriminator :: Loss: 0.29231048], [ Generator :: Loss:
1.032237]
Epoch: 5, [Discriminator :: Loss: 0.30067348], [ Generator :: Loss:
1.07507]
Epoch: 6, [Discriminator :: Loss: 0.23213515], [ Generator :: Loss:
1.2063006]
...
- A few key points here:
- Anything with ############ has been reduced to a simple summary line—there's too many lines for a book to show them.
- This code could be improved with a graphical look at the Discriminator and Generator losses.
- If you want to check to make sure that your docker image has been built, check it using the docker images command in another Terminal window. You should see that a ch3 image was recently built.
- If you aren't seeing PNGs in your data directory, make sure that the data directory is located at $HOME/full-gan/data. If the directory is not there, feel free to modify your run.sh file to change the mapped volume.
Now, let's talk about the results of this GAN!