Professional Documents
Culture Documents
By: BENSLIMANE Bilal - CHOUKRI Yassine - ANNASSI Othmane - ARRAD Karim Pr.Hiba CHOUGRAD
01 General Introduction
02 GAN Architecture
Table Of Content
03 Types Of GAN
04 Implementation
Introduction
INTRODUCTION
Generative modeling is an unsupervised learning
task in machine learning that involves
automatically discovering and learning the
regularities or patterns in input data in such a
way that the model can be used to generate or
output new examples that plausibly could have
been drawn from the original dataset.
Why GAN's
DNN LIMITS
Quality of data
DNN LIMITS
Quality of data
Real
Ac
G D =
cy
+
cu
ra
Image
cu
ra
cy
Ac
GAN Architectures
General Concept
Generator
Generator training requires tighter integration between the generator and the discriminator than discriminator training
requires. The portion of the GAN that trains the generator includes:
Random input.
Generator network, that transforms the random input into a data instance.
Discriminator output.
Generator loss, which penalizes the generator for failing to fool the discriminator.
Discriminator
The discriminator is a binary classifier. It tries to distinguish real data from the data created by the generator.
The discriminator's training data comes from two sources:
Real data: instances(such as real pictures of people), That the discriminator uses as positive examples during
training.
Fake data: instances are created by the generator. The discriminator uses these instances as negative examples
during training.
Discriminator
During Discriminator Training:
The discriminator classifies both real data and fake data from
the generator.
The D loss function penalizes the discriminator for
misclassifying a real instance as fake or a fake instance as
real.
The discriminator updates its weights through
backpropagation from the discriminator loss through the
discriminator network.
GAN Training
G D
Generator is Frozen Training the descriminator
REAL VS FAKE DATA
GAN Training
G D
Generator is Frozen Training the descriminator
REAL VS FAKE DATA
Distorted faces
Types of GAN
Types of GAN
DCGAN
It is a Deep convolutional GAN. It is one of the most used, powerful, and successful types of GAN
architecture. It is implemented with help of Convolutional neural network in place of a Multi-layered
perceptron.
A DCGAN is a GAN that uses deep convolutional layers as part of its architecture. You can think of it as a
convolutional neural network (CNN) and a GAN combined.
Types of GAN
DCGAN
The algorithm of DCGAN, which can be considered as the application of GAN extended to the field of CNN.
It combines CNN in supervised learning with GAN in unsupervised learning.
The advantage of GAN is that it requires no specific cost function and can learn good feature representation,
but GAN is very unstable to train and often causes generators to produce meaningless output. Compared
with GAN, DCGAN made some changes to the structure of convolutional neural network to improve the
quality of samples and the speed of convergence.
Types of GAN
DCGAN
z, the input of G is a noise, which can be gaussian noise.
a fake image is generated– G(z).
G (z) and x are taken as inputs to discriminator D.
The output of the final discriminator D represents the probability
that the data is real, which ranges from 0 to 1.
For discriminator, batch normalization is generally not required
after the first layer convolution, and the combination mode of
‘‘conv2D +BN+ LeakyReLU’’ is always followed.
For the generator, the first layer is the full connection layer, then
the combined mode of ‘‘conv2D+BN+ReLU’’, and the last layer of
convolution is activated by tanh
Types of GAN
BigGAN
BigGAN is a type of generative adversarial network that was designed for scaling generation to high-
resolution, high-fidelity images. It includes a number of incremental changes and innovations. The baseline
and incremental changes are:
Using SAGAN as a baseline with spectral norm. for G and D.
Using a Hinge Loss GAN objective
Using class-conditional batch normalization to provide class information to G.
Using a projection discriminator for D to provide class information to D.
Types of GAN
BigGAN
model consists of a generator to predict future frames and dual discriminators, one of which is used to
discriminate frames (appearance), and the other of which is used to distinguish the motion between true and
false.
Types of GAN
DVD-GAN
Process of Implementation
using DCGAN
Steps to Implement DCGAN
1 - Importing Libraries
Visualisation du Training-set
Steps to Implement DCGAN
3 - Generator function
First we apply a 2D transposed
convolution operator over an input image
composed of several input planes.
Thanks