Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
1
Hello and welcome to listen to Soyo.
2
All right so in the previous Steuerle we took care of the first step to obtain the weight of the neural
3
network of discriminator.
4
And now we're going to tackle the second step.
5
Updating the weights of the neural network of this time the generator.
6
So it's going to be easier than the first big step.
7
Break down the area between the real error and fake error to compute the total error.
8
This time there will only be one error Dallas area between the prediction of the discriminator whether
9
or not the image generated by the generator should be accepted yes or no.
10
And the target which will be equal to 1.
11
Why will this be equal to one that's because this time we want the generator to have some weights that
12
allow his brain to produce some images that look like real images and therefore we want to push the
13
production close to a target of one this time we're training the brain of the generator to be able to
14
generate some images that look like real images.
15
So that's another key point to understand the target will be equal to one.
16
Even if this time the image that will be the input of the discriminator will be the fake image of the
17
generator.
18
All right.
19
So let's do this.
20
It's going to be faster than previously.
21
We're going to start by initializing the gradient of the generator with respect to the weights to zero.
22
And let's do that efficiently.
23
We simply need to take that line of code again because that's the same thing we did for the gradient
24
of the discriminator.
25
So I am pasting in here and then replacing a D by of course not g.
26
We want to initialize the weight of the gradient of the generator this time.
27
Then next step.
28
Well the next step would naturally be to get the input.
29
But the thing is we already have the inputs you know the input is going to be this fake image or should
30
I say this mini batch of fake images that are going to be again the input of the discriminator.
31
So we already have the input we already have the fake images of the mini batch and therefore we're directly
32
going to get the targets.
33
And so this time according to you what is the toy going to be.
34
Is it going to be a mini batch of zeros or of ones.
35
Well as I explained in the beginning of the tutorial this time we want to push the predictions to one
36
because we want the discriminator to accept that the fake images are real images.
37
So the target for all the input fake images of the mini batch should be all ones and therefore I'm taking
38
this line of code copying it and pasting it right here to get my targets of once great.
39
My target is already wrapped into a variable.
40
Perfect.
41
I'm allowed to move on to the next step.
42
So now what is the next step.
43
Well the next step is to get the output the output of the discriminator when the input is are fake images.
44
Therefore I'm getting a new variable output and I'm taking my neural network of the discriminator to
45
needy and I'm feeling this neural network of the discriminator with the Merabet fake input images.
46
And so for each of these fake images I'm going to get the discrimination that is I'm going to get a
47
discriminating number between 0 and 1 if this number is close to zero the image will be rejected.
48
And if this number is close to 1 the image will be accepted.
49
Now something important remember that in the previous output we detached the gradient of fake.
50
This time we're not going to do it.
51
Why is that.
52
Because we want to keep the gradient of fake We want to keep the Great in effect because we're going
53
to update the weights of the neural network and the generator.
54
And two of these weight will actually need the gradient AFAIK.
55
So that's why it's important here not to detach it.
56
All right.
57
Next step now that we have the output and the target.
58
Well we are ready to get the error of prediction but this time this error of prediction is going to
59
be the error related to the generator because we will back propagate this error back into the neural
60
network of the generator as opposed to before where we back propagated the total error back to the discriminator.
61
So that's important now to understand that this error is related to the generator and therefore I'm
62
going to call it the r r g e r r g.
63
Then I'm going to get from my criterion that is going to compute the last error between the outputs
64
and the target the output which is the output of the discriminator when the input is the fake image
65
and the target which is the mini Becci full of watts.
66
All right so now that we have the error we can back propagate it in the neural network of the generator.
67
So I'm taking this error.
68
R R G than that.
69
And then applying the backward function which keep in mind so far only compute the gradients but then
70
we are going to use the optimizer of the generator to make sure that this time it's going to be the
71
weight of the generator that will be updated.
72
Therefore I'm exactly going to take the optimizer of the generator optimizer g to update the weights
73
of the neural network of the generator.
74
And here we go.
75
The second step is done.
76
So congratulations.
77
Now basically the difficult part of the training is done.
78
Now it's time for fun.
79
We're gonna print the losses inside the loop so we're going to stay in the loop then we're going to
80
save the real images and also of course the fake images and then eventually after the training the fake
81
images and the real image will appear in this results folder that will contain the final results.
82
So let's do all this fun stuff.
83
In the last tutorial of this module I'm super excited to show you the result.
84
It's going to be something it's going to be pure computer vision creation.
85
So prepare yourself a good coffee or a good tea sit comfortably in your chair and get ready for the
86
final results.
87
Until then enjoy computer vision.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.