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 this Python tutorial we have just defined in the previous Statoil the architecture
2
of the neural network of the generator.
3
And now we need to add a tool to our class G which will be the forward function that will forward propagate
4
the signal inside the whole neural network.
5
The good news is that after the storm we had in the British Statoil.
6
Now things are going to get really easy because we will simply use the main object which remains an
7
object of the sequential class that contains all the different modules to forward propagate the signal
8
in just one line of code.
9
Let's do it.
10
We are going to define a new function.
11
There are forms starting with death and then we need to specify the name of this function which will
12
be forward for the forward propagation and this function is going to take two arguments.
13
Self our object which represents nothing else than the neural network itself.
14
The neural network of the generator.
15
And also because as I've just said we're going to use the main object to propagate the signal but since
16
this main object is a variable attached to our object.
17
Well we need to input ourselves object here to be able to use self-determine.
18
All right.
19
And then the second argument you can see the year is actually going to be the input that is nothing
20
else than the input of the neural network of the generator.
21
I remind this input is going to be some random vector of size 100.
22
That's why we specified 100 here for the size of the input of our first inverse convolution.
23
This is going to be a random vector input of the generator which will just represent some noise to generate
24
a fake image and that fake image will be the output of the generator.
25
It will be the fake image generated by the generator.
26
But to get this fake image we need to create this random vector noise that will be exactly this input.
27
The input of the generator and this input will have a size of 100.
28
It will become much more clear when we start the training of our two brains.
29
The brain of the generator and the brain of the discriminator because right now you only see some names
30
for the variable such as inputs but you'll see that we will create those actual inputs later on in the
31
training phase.
32
So no worries if it's not 100 percent crystal clear now it will become much clearer when we start the
33
training face for now.
34
Just make sure to understand that we're creating the generator and the discriminator.
35
And right now we're making the forward function that will forward propagate the signal inside the neural
36
network at the generator.
37
All right so now things are going to get super easy.
38
We are going to take our self duct main memory module which is the metal module of our neural network
39
object represented by self.
40
We're going to feed this neural network with the inputs which so far is just an argument but then will
41
become noise random vector we are fitting the new one that work with the input and this will return
42
the output because the signal is propagated through all the different modules layers of this neural
43
network and then in the end we'll get the output which of the three channels of the fake generated images.
44
And therefore since we get now here I am introducing a new variable that I'm calling output and that
45
is equal to exactly what is returned by the main metor module.
46
All right so now that we get the output which just need to return it and therefore I'm just entering
47
the fourth function with return output.
48
And there we go we have our output of the generator.
49
Perfect.
50
So double congratulations because you made the forward function and because you're done with the whole
51
class defining the generator but be careful we just defined the class.
52
Nothing is created yet.
53
And so in the next to toile we'll have to create an instance that is not checked of the class of the
54
generator class.
55
And this object will be nothing else than the neural network of the generator defined by the following
56
properties and containing the tool or the Ford function to propagate the signal inside the neural network.
57
So let's create this object in the next tutorial.
58
It will be quick and easy will just create the object and we'll just apply the weights in it function
59
to initialize the weights of the neural network as it should be.
60
That is according to the conventions of the adversarial networks.
61
So let's do that in the next tutorial.
62
And 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.