提交 66b6f2a5 编写于 作者: W wangyang59

change figure size in gan tutorial

上级 ea5594d1
......@@ -4,8 +4,12 @@ This demo implements GAN training described in the original [GAN paper](https://
The high-level structure of GAN is shown in Figure. 1 below. It is composed of two major parts: a generator and a discriminator, both of which are based on neural networks. The generator takes in some kind of noise with a known distribution and transforms it into an image. The discriminator takes in an image and determines whether it is artificially generated by the generator or a real image. So the generator and the discriminator are in a competitive game in which generator is trying to generate image to look as real as possible to fool the discriminator, while the discriminator is trying to distinguish between real and fake images.
<center>![](./gan.png)</center>
<center>Figure 1. GAN-Model-Structure [Source](https://ishmaelbelghazi.github.io/ALI/)</center>
<p align="center">
<img src="./gan.png" width="500" height="300">
</p>
<p align="center">
Figure 1. GAN-Model-Structure [figure credit](https://ishmaelbelghazi.github.io/ALI/)
</p>
The generator and discriminator take turn to be trained using SGD. The objective function of the generator is for its generated images being classified as real by the discriminator, and the objective function of the discriminator is to correctly classify real and fake images. When the GAN model is trained to converge to the equilibrium state, the generator will transform the given noise distribution to the distribution of real images, and the discriminator will not be able to distinguish between real and fake images at all.
......@@ -107,7 +111,7 @@ $python gan_trainer.py -d uniform --useGpu 1
The generated samples can be found in ./uniform_samples/ and one example is shown below as Figure 2. One can see that it roughly recovers the 2D uniform distribution.
<p align="center">
<img src="./uniform_sample.png" width="256" height="256">
<img src="./uniform_sample.png" width="300" height="300">
</p>
<p align="center">
Figure 2. Uniform Sample
......@@ -130,5 +134,9 @@ To train the GAN model on mnist data, one can use the following command:
$python gan_trainer.py -d mnist --useGpu 1
```
The generated sample images can be found at ./mnist_samples/ and one example is shown below as Figure 3.
<center>![](./mnist_sample.png)</center>
<center>Figure 3. MNIST Sample</center>
<p align="center">
<img src="./mnist_sample.png" width="300" height="300">
</p>
<p align="center">
Figure 3. MNIST Sample
</p>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册