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 the final episode of this module the episode we will get to see the final result.
2
Not only are we going to see the training of our DC fans but also we're going to see what it's capable
3
of in terms of art.
4
We're going to see the generated images of our DC guns in this fall their result here that so far is
5
empty.
6
As you can see as far is empty it's going to be populated with all the fake images of our Zygons.
7
We're going to check if it looks like something.
8
So if you're ready we'll start by printing some interesting information that we would like to see during
9
the training.
10
And that is for example the Epoque how many epochs out of 25.
11
And also the step that would be nice to see the steps reached because there are actually a lot of steps
12
in the day loading many batches so let's print of this and mostly what we need to do also is to save
13
the images in this result's folder.
14
And then after all this will be good to start the show.
15
So let's do this let's quickly do those print.
16
So I'm going to put in quotes.
17
Well first the box into brackets so I'm going to add a percent D out of percent D because you know this
18
first percent will correspond to the epoch.
19
The second percent will correspond to 25.
20
So you know we'll see like the epical reached out of 25.
21
Then we're going to do something similar for the steps.
22
So I'm adding another pair of square brackets.
23
Percent D out of percent D.
24
So this time percent here will correspond to the step I and percentage will correspond to the number
25
of elements and they lower that is Lendale or lower.
26
All right.
27
And then after this that is for each step of each epoch we will print the last of the discriminator
28
which will be here since it's a float.
29
We're going to add some percent that for f to have a float with four decimals then we're going to add
30
the same for the loss of the generator.
31
So I just need to replace the here by less Gee there we go almost over.
32
Now we need to get out of the quotes at some percent and then in some parenthesis we put the names of
33
the variables that correspond to these values here the percentages and the percent point for refs.
34
All right.
35
So the first value to response to this First percent D is Epoque.
36
So here we have two input first Epoque then the second percent here corresponds to 25.
37
So when 25 then the third percent here corresponds to the step.
38
I see that exactly.
39
I then the fourth percent here corresponds to the number of mini batches that is Lenn they are lower.
40
So here I'm adding Lenn data low.
41
And then finally we have to input the variable names for our two losses corresponding to point for f
42
and point for f..
43
So the first one is the last of the discriminator and the variable for that is.
44
So I'm adding a comma and the variable for that is of course the R R D.
45
But then to get the value itself we need to take the data attribute and then in some brackets we add
46
zero.
47
That will get us exactly what we want that is the value of the error of the discriminator.
48
Perfect almost done.
49
We need to do the same for the generator.
50
So come out the same and we replace our Ardi by R.G..
51
Perfect.
52
I think our print is ready.
53
Great.
54
Now as you can see I would like to save the real images and the generated images of the mini batch every
55
100 steps.
56
So now we're going to do is to make an IF condition that will save the images every 100 steps.
57
And the trick to do that is to an IF condition and then I present 100 equal equal zero.
58
That's the rest of the division of I buy 100.
59
So if the rest of the division of I by One hundred is zero that means that I's divided by 100.
60
And so this way we get this step every 100 steps are right every 100 steps.
61
What do we do.
62
Well first we're going to save the real images.
63
So to do this I'm going to take you tiles which is the shortcut name we gave to torch vision that you
64
that allowed to save some images with torch vision.
65
An advanced library of torch for computer vision.
66
So you teals and then we're going to use to save underscore image function to save the different images
67
that is the real images on which our model was trained.
68
And then the fake images.
69
So we're going to start with the real images and therefore what we have to put here is our batch of
70
real images that we called real.
71
That's the first argument and then for the second argument we need to specify in quotes the name of
72
the path leading to the location where we want to save the real images.
73
And this path is going to be P.C. S which is a train that will refer to the route then slash results
74
because the results folder here is a subfolder of our replow the root folder.
75
So prison S then slash and then after that we need to give the name to the PNAC founders who contend
76
these images.
77
And we're going to call them real and this core samples that PNH.
78
All right and then some percent and in some double quotes we need to specify the string attached to
79
this percent S and that is that slash results because the name of the folder where we want to save the
80
images is our results folder and this that here corresponds to the roots that is this working directory
81
folder.
82
All right.
83
And then we can add a third argument which is just to normalize.
84
And this argument is normalize and we have to set it equal to true.
85
Perfect.
86
So we saved our batch of real images contained in real here and now we're going to do the same for the
87
fake images.
88
So we're going to get these fake images by calling our next G network again to which we feed the noise
89
random vector.
90
So we're just doing it again to get the fake images.
91
And now we can save them so I'm just going to copy this line pasted right below.
92
And now I just need to replace a few things first.
93
This time we're not setting the real image but fake that data that's what contains the fake images.
94
Then here we keep present.
95
As for the name of the path leading to the folder where we save our images but then we're not going
96
to call them this time.
97
Real samples but fake underscores samples underscore airpark underscore.
98
And here I'm going to put the number of the epoch when the fake images are saved.
99
And to do this I'm going to specify here a double with three integers so present.
100
Oh 3D.
101
And then that PNH.
102
All right.
103
And then since I added a new variable here with the percent of 3D then besides the path of the results
104
in double quotes I need to add the variable corresponding to 0 3 and according to you what is it.
105
Well that's of course the epoch.
106
So that's where you will get the fake images and we'll know from which book they are coming.
107
All right.
108
We will know in which epoch they were produced by the generator.
109
Perfect.
110
And then I'm keeping normalize equal.
111
All right.
112
And now we're ready to watch the final result.
113
And so if you're ready now it's time for the show.
114
And there we go.
115
I just executed.
116
I selected all the code and pressed command or control plus enter.
117
And there we go.
118
We have started the training.
119
So as you can see this is the first epoch and the first steps with 0 1 2 3 4.
120
And for each of the step in each book we get Indeed the last of the discriminator and the last of the
121
generator.
122
So now it's going to take a while it's actually going to take several hours on my computer.
123
I'm going to let my computer do all this work for me.
124
We're not going to watch the whole training.
125
And at the end of the training I'll see you back and we will see the fake images generated by our decisions
126
and we'll see if it looks like something.
127
So let's let this run and I'll see you at the end of the training.
128
All right the training is over.
129
It actually took more time than I thought.
130
When I woke up after a long night of sleep well it was still not over.
131
So I guess it took more than eight hours in my computer.
132
Indeed I don't sleep any more three hours per day.
133
I noticed it was bad for life expectancy and I still want to be able to make some courses for your children
134
and grandchildren.
135
But as long as we have the final results that's all good.
136
So I'm going to show them to you now and we'll see if we can call our deep convolutional dance.
137
A great artist.
138
All right.
139
So before I show you the first samples I would like to show you the real samples just to see on which
140
images real images are a computer vision model learned to generate some fake images.
141
So these are the images.
142
All good.
143
Now let's see what it was capable of creating.
144
All right so let's start with the first samples.
145
Nothing special here.
146
We cannot call it art at all.
147
But then what about the second one.
148
The second one is already better the second one looks more like something but still it still looks like
149
some kind of smoke except for this one maybe that looks like a mountain but I think we'll get better
150
than that.
151
Then some pools.
152
Number two.
153
So the numbers here correspond to the box that was given at about 0 1 2 3 until about 24 25.
154
Back in Seoul.
155
And this one this one is actually pretty good.
156
We start to see something here.
157
We still need a bit of imagination to figure out what's inside the image here.
158
I see him for example to see some kind of a duck on a on the sea or the ocean.
159
I don't know if you see the same thing.
160
Well maybe my imagination is playing some tricks but I can start to see something here.
161
Let's look at the third fake samples.
162
So the fake images of the third book are right definitely better here.
163
Here we can see a human.
164
I guess it's a human here.
165
I think I see a squirrel.
166
I don't know if you agree.
167
OK.
168
Much better.
169
Let's look at the other ones much better here as well.
170
All right.
171
Let's look at number six.
172
Much better here.
173
We can see it better and better each time.
174
I don't know if you agree but to me the fake images really start to look like some real images even
175
if it's not perfectly net.
176
It's still a little bit blurry.
177
But still we can see some objects here.
178
All right.
179
Let's look at number 10 for example to see if it's already much better.
180
Yes it looks pretty good.
181
Let's have a look at number 15.
182
Still very good so perhaps you didn't need that many a book perhaps you could try to do the training
183
with five or up to 10 bucks.
184
But definitely after a certain number of book we see some great results.
185
And here it's even more visible than before even more clear.
186
And these are pretty cool images.
187
We can see some nice colors now.
188
So I would.
189
They're calling this model an artist maybe not Picasso but definitely a better artist than me.
190
So that's pretty cool.
191
And that's actually the end of this Mudgal congratulations for having implemented the deep convolutional
192
Ganns.
193
That was definitely not good stuff.
194
You coded almost 150 lines of code so well done.
195
Awesome job.
196
You not only implemented the deep convolutional Ganns But also you smashed the three modules of this
197
course.
198
Well keep in mind you implemented some cutting edge models.
199
I remind that SSD is the state of the art moral and object detection.
200
It beats the faster our CNN and you know.
201
So at the time I'm speaking and I hope this course will last but at the time I'm speaking you did implement
202
a state of the art model in computer vision and deep learning.
203
So really really really you can be proud of yourself.
204
Keep up that great work and great passion for the coming courses and some more modules.
205
This adventure is definitely not over.
206
We will learn so much more.
207
We are dedicated instructors really happy to share our knowledge so there will be more.
208
And until then enjoy machine learning.
209
Enjoy the journey enjoy.
210
I mostly enjoy computer vision.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.