Building our first simple GAN

preview_player
Показать описание
In this video we build a simple generative adversarial network based on fully connected layers and train it on the MNIST dataset. It's far from perfect, but it's a start and will lead us to implement more advanced and better architectures in upcoming videos.

❤️ Support the channel ❤️

Paid Courses I recommend for learning (affiliate links, no extra cost for you):

✨ Free Resources that are great:

💻 My Deep Learning Setup and Recording Setup:

GitHub Repository:

✅ One-Time Donations:

▶️ You Can Connect with me on:

OUTLINE:
0:00 - Introduction
0:29 - Building Discriminator
2:14 - Building Generator
4:36 - Hyperparameters, initializations, and preprocessing
10:14 - Setup training of GANs
22:09 - Training and evaluation
Рекомендации по теме
Комментарии
Автор

If you're completely new to GANs I recommend you check out the GAN playlist where there is an introduction video to how GANs work and then watch this video where we implement the first GAN architecture from scratch. If you have recommendations on GANs you think would make this into an even better resource for people wanting to learn about GANs let me know in the comments below and I'll try to do it :)

I learned a lot and was inspired to make these GAN videos by the GAN specialization on coursera which I recommend. Below you'll find both affiliate and non-affiliate links, the pricing for you is the same but a small commission goes back to the channel if you buy it through the affiliate link.

Here's the outline for the video:
0:00 - Introduction
0:29 - Building Discriminator
2:14 - Building Generator
4:36 - Hyperparameters, initializations, and preprocessing
10:14 - Setup training of GANs
22:09 - Training and evaluation

AladdinPersson
Автор

Awesome video, you explain exactly what should be explained, I love it!

aminasadi
Автор

I think in 18:22 usung detach is better. for one thing retain_graph = True cost more memories and for another if we dont use detach we optimize the paras in G when we train D

wongjerry
Автор

8:00 - transforms.Normalize((0.1307, ), (0.3081, )) will not work because of the following:
* nn.Tanh() output of the Generator is (-1, 1)
* MNIST values are [0, 1]
* Normalize does the following for each channel: image = (image - mean) / std
* So transforms.Normalize((0.5, ), (0.5, )) converts [0, 1] to [-1, 1], which is ALMOST correct, because nn.Tanh() output of Generator (-1, 1) excluding one and minus one.
* transforms.Normalize((0.1307, ), (0.3081, )) converts [0, 1] to ≈ (-0.42, 2.82). But Generator can not generate values greater than 0.9999... ≈ 1, so it will not generate 2.8 for white color.
That is why transforms.Normalize((0.1307, ), (0.3081, )) will not work.

P.S. To use transforms.Normalize((0.1307, ), (0.3081, )) you should multiply nn.Tanh() with 2.83 ≈ nn.Tanh() * 2.83 ≈ (-2.83, 2.83)

Carbon-XII
Автор

how is the song called at 20:00? sounds so chill made me move like on the dancefloor while at my working desk learning GANs with u

Astrovic
Автор

The code run great, but how did you make those images at 20:37 appear????
I been trying to do that in google colab, the code work, but no image.

Huy-G-Le
Автор

Thanks a lot for the video. It really helped me in understanding the naunces of GAN and helped me write it from scratch as well. Keep on going, buddy!

sourabharsh
Автор

how do you get the images to show on tensorboard?

yardennegri
Автор

Hello, i love your videos as they are very precised and perfect but how do i view using colab instead of tensor flow

thederivo
Автор

Perfect explanation of the loss function and why we use the minimization instead of maximization of Discriminator.

ShahryarSalmani
Автор

how can i include tensorboard features within the GAN ipynb file to visualize the log files?

Abby.Tripathi
Автор

What changes will be there in the code if we use disc(fake).detach() instead? Will there be any changes in line 77? at 18:34

shambhaviaggarwal
Автор

At 15:33, and 19:14 why use disc.zero_grad() and gen.zero_grad() instead of using opt_disc.zero_grad(), and opt_gen.zero_grad() respectively ?

srjankundu
Автор

Hello. Thx for the video. I tried this code exactly except that i used 400 epoch. But still fake images are like noises. How did you get this results on the tensorboard. Can you please share the hyperparams that you used?

rabia
Автор

thanks a lot, now i have a better understanding of GAN

car
Автор

Very nicely explained. Loved your clarity.

saurabhjain
Автор

I love the way your ide looks, what are you using/ what settings?

NewNew-qnkh
Автор

You Are Awesome😎😎. Please Continue This Series...Thanks For Awesome Video Series

aadarshraj
Автор

Question : Why we use zero_grad with disc and dis and not opt_disc and opt_gen?

mustafashaikh
Автор

Why is your tensorboard updating automatically the new images? For me I have to refesh the page in order for it to update

maxim
join shbcf.ru