SlideShare a Scribd company logo
1 of 34
TRIPLE GAN M RUPESH KUMAR
YADAV
DEEP GENERATIVE
MODELS
Synthetic Data Generation
GENERATIV
E MODELS
Auto Regressive Models
Variational Autoencoders (VAE
)
Generative Adversarial
Networks (GAN )
Flow based Generative Model
•Need be trained on a large dataset of images
•learns the conditional distribution of each pixel given the previous pixels
•The model would generate the image one pixel at a time, conditioning
on the previous pixels
•May suffer from the problem of exposure bias
•They can generate high-quality samples that are similar to the original
data
Auto
Regressive
Models
•learns a bijective mapping between a simple base distribution and the
target data distribution
•The mapping is implemented as a series of invertible transformations
•fast sampling, stable training and no need for specialized inference,
easier to implement
•Limited modelling power, Large memory requirements, Lack of diversity
Flow
based
Models
•VAEs learn a probabilistic mapping from data to a low-
dimensional latent space
• Generates output vectors that are similar, but not identical, to the
source images
•VAE introduces variability with mean and standard deviation
layer while maintaining similarity to source images
• Generate blurry outputs, and are unrealistic
VAE
•GANs learn a non-probabilistic mapping from random noise to
data
• Can generate highly realistic variations of real-world data
• GAN models can fail to converge
• GAN models can collapse and also computationally intensive
•with mean and standard deviation layer while maintaining
similarity to source images
GAN
GAN
GAN : THE ADVERSARIAL GAME (2 PLAYER
FORMULATION)
● GAN is formulated as a two-player game
● The Generator G takes a random noise z
as input and produces a sample G(z) in
the data space
● The discriminator D identifies whether a
certain sample comes from the true data
distribution p(x) or the generator.
● Both G and D are parameterized as
deep neural networks and the training
procedure is to solve a minimax
problem
● pz(z) is a simple distribution
HERE WE ARE
TAKING
BINARY CROSS
ENTROPY
TO COMPUTE LOSS
FUNCTION
❖ ArgmaxD {V(G,D)}
❖ The Optimal
Discriminator is
D*
G(x) = p(x)/(pg(x) +
p(x))
in the nonparametric
setting, and the global
equilibrium of this game
is achieved if and only if
pg(x) = p(x)
❖ ArgmaxG {V(DG,D)}
❖ G* = ∫-log2(pG(x)+p(x)) +
p(x)[log2 +
log(p(x)/pG(x)+p(x))]
❖ G = ∫-log2(pG(x)+p(x)) + p(x)[log2 +
log(p(x)/pG(x)+p(x))]
PROBLEMS WITH GAN
Mode Collapse Problem with Counting
Mode Collapse occurs due to a
sample or feature getting overfit
and that fools the discriminator,
Thus it is being outputted, It
occurs due to over training
PROBLEMS WITH GAN
Problem with perspective Vanishing Gradient
GAN is effected by the Vanishing
Gradient Problem, Some features
lose their importance over a
period of time, After running for
many iterations
HARD TO ACHIEVE NASH
EQUILIBRIUM
PROBLEMS WITH GAN – AND DISCUSSIONS
❖ Two alternative training
objectives that work well for
either classification or image
generation in SSL, but not both.
They are :
1. Feature matching works well in
classification but fails to generate
indistinguishable samples
2. Minibatch discrimination is good
at realistic image generation but
cannot predict labels accurately
❖ Disentangling meaningful
physical factors like the object
category from the latent
representations with limited
supervision is of general interest
Reason : A single discriminator network which has the sole role of
distinguishing whether a data-label pair is from the real labeled dataset or
not.
Existing GANs in SSL have two problems:
(1) the generator and the discriminator (i.e., the classifier) may not be optimal at
the same time
(2) the generator cannot control the semantics of the generated samples. The
problems essentially arise from the two-player formulation, where a single
discriminator shares incompatible roles of identifying fake samples and predicting
labels and it only estimates the data without considering the labels
TRIPLE GAN
TRIPLE GAN
Triple generative adversarial network (Triple-GAN) framework for both
classification and class-conditional image generation with limited
supervision
Two conditional networks—a Classifier and a Generator to generate
fake labels given real data and fake data given real labels, which will
perform the classification and class-conditional generation tasks
respectively. To jointly justify the quality of the samples from the
conditional networks, we define a discriminator network which has the
sole role of distinguishing whether a data-label pair is from the real
labeled dataset or not. The resulting model is called Triple-GAN
because we consider three networks as well as three joint distributions,
i.e., the true data-label distribution and the distributions defined by
the two conditional networks
OBJECTIVES OF TRIPLE GAN
Characterize the
process of
Classification
Class-
conditional
generation in SSL
COMPONENTS OF TRIPLE GAN
A classifier C that (approximately) characterizes the
conditional distribution pc(y|x) ≈ p(y|x)
A class-conditional generator G that (approximately)
characterizes the conditional distribution in the other
direction pg(x|y) ≈ p(x|y); and
A discriminator D that distinguishes whether a pair of data
(x, y) comes from the true distribution p(x, y). All the
components are parameterized as neural networks
THREE PLAYER
FORMULATION
In the game, after a sample x is drawn from p(x), C
produces a fake label y given x following the conditional
distribution pc(y|x).
The fake input-label pair is a sample from the joint
distribution pc(x, y) = p(x)pc(y|x).
Similarly, a fake input-label pair is sampled from G by
first drawing y ∼ p(y) and then drawing x|y ∼ pg(x|y),
Hence from the joint distribution pg(x, y) =
p(y)pg(x|y).For pg(x|y), we assume that x is transformed
by the latent style variables z given the label y, namely,
x = G(y, z), z ∼ pz(z), where pz(z) is a simple distribution
(e.g., uniform or standard normal). The fake input-label
pairs (x, y) generated by both C and G are sent to the
discriminator D. D can also access the input-label pairs
from the true data distribution as positive samples.
Our desired equilibrium is that the joint distributions
defined by the classifier and the generator both converge
to the true data distribution
LOSS FUNCTION
The objective functions in the process as
adversarial losses :
minC,G max D Ep(x,y) [log D(x, y)] + αEpc(x,y)
[log(1 − D(x, y))] +(1 − α)Epg(x,y) [log(1 −
D(G(y, z), y))]
where α ∈ (0, 1) is a constant that
controls the relative importance of
classification and generation
for convenience α=1/2 .
For any fixed C and G, the optimal D of the game
defined by the utility function U(C, G, D) is:
D*C,G(x, y) = p(x, y)/ (p(x, y) + pα(x, y)) ,
where pα(x, y) := (1 − α)pg(x, y) + αpc(x, y) is a
mixture distribution for α ∈ (0, 1).
V (C, G) = maxD U(C, G, D)
V (C, G) = − log 4 + 2JSD(p(x, y)||pα(x, y))
pα(x, y) := (1 − α)pg(x, y) + αpc(x, y)
The equilibrium indicates that if one of C and G tends to the data distribution,
the other will also go towards the data distribution, which addresses the
competing problem
Given p(x, y) = pα(x, y), the marginal distributions are the same for p, pc and
pg, i.e. p(x) = pg(x) = pc(x) and p(y) = pg(y) = pc(y)
However, it may not be unique, and we should minimize an additional
objective to ensure the uniqueness
The objective functions in the process as adversarial losses :
minC,G max D Ep(x,y) [log D(x, y)] + αEpc(x,y) [log(1 − D(x, y))] +(1 − α)Epg(x,y) [log(1 − D(G(y, z),
y))] +RC+αPRP
where α ∈ (0, 1)
● Because label information is extremely insufficient in SSL, we propose pseudo
discriminative loss
RP = E pg [− log pc(y|x)]
● The Cross Entropy Loss to C
RC = E (x,y)~p(x,y) [− log pc(y|x)]
UPDATING THE WEIGHTS DURING
BACKPROPAGATION
DISENTANGLE THE CLASSES AND STYLES OF THE
INPUT AND TRANSFER SMOOTHLY IN THE DATA SPACE
VIA INTERPOLATION IN THE LATENT SPACE CLASS-
CONDITIONALLY”.
in simpler terms:
● To disentangle the classes and styles of the input means to
separate the different categories (such as dogs or cats) and
visual features (such as colour or shape) of the images that are
given to the model.
● To transfer smoothly in the data space means to create new
images that look realistic and natural by changing some
aspects of the original images gradually.
● To do this via interpolation in the latent space means to use a
mathematical technique that finds intermediate values between
two points in a hidden representation of the data that captures
its essential characteristics.
● To do this class-conditionally means to do this only for images
that belong to the same category (such as dogs or cats), and
not across different categories.
RESULTS
Epoch 0 Epoch 100
Epoch 4000 Epoch 8490
Issues faced initially
ISSUES FACED
C:/Users/rupes/AppData/Local/Programs/Python/Python310/python.exe"c:/rupesh/class
_3rd_year/Miniproject/TripleGansResearch/TripleGansResearch800fcf5af3a0160802c880
1bdf2652c3d0aa53e2/tgan-code_cifar/triplegan.py"
2023-03-31 23:27:50.658522: W tensorflow/tsl/framework/cpu_allocator_impl.cc:83]
Allocation of 253755392 exceeds 10% of free system memory. 2023-03-31
23:27:50.821873: W tensorflow/tsl/framework/cpu_allocator_impl.cc:83] Allocation of
253755392 exceeds 10% of free system memory.
[*] Reading checkpoints...
[*] Failed to find a checkpoint
[!] Load failed...
2023-03-31 23:27:53.723193: W tensorflow/tsl/framework/cpu_allocator_impl.cc:83]
Allocation of 105380352 exceeds 10% of free system memory.
Epoch: [ 0] [ 0/1562] time: 28.2756, d_loss: 1.37041903, g_loss: 1.71234071, c_loss:
2.30251503
Deep generative modeling still
remains an active area of research
with many challenges, such as
evaluating the quality of generated
samples and the prevention of
mode collapse, which occurs when
the generator starts producing
similar or identical samples,
leading to a collapse in the modes
of the data distribution
Synthetic Image Data Generation using GAN &Triple GAN.pptx

More Related Content

Similar to Synthetic Image Data Generation using GAN &Triple GAN.pptx

Google BigQuery is a very popular enterprise warehouse that’s built with a co...
Google BigQuery is a very popular enterprise warehouse that’s built with a co...Google BigQuery is a very popular enterprise warehouse that’s built with a co...
Google BigQuery is a very popular enterprise warehouse that’s built with a co...
Abebe Admasu
 

Similar to Synthetic Image Data Generation using GAN &Triple GAN.pptx (20)

Citython presentation
Citython presentationCitython presentation
Citython presentation
 
그림 그리는 AI
그림 그리는 AI그림 그리는 AI
그림 그리는 AI
 
20MEMECH Part 3- Classification.pdf
20MEMECH Part 3- Classification.pdf20MEMECH Part 3- Classification.pdf
20MEMECH Part 3- Classification.pdf
 
Introduction to PyTorch
Introduction to PyTorchIntroduction to PyTorch
Introduction to PyTorch
 
Generative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural NetworksGenerative modeling with Convolutional Neural Networks
Generative modeling with Convolutional Neural Networks
 
Performance analysis of transformation and bogdonov chaotic substitution base...
Performance analysis of transformation and bogdonov chaotic substitution base...Performance analysis of transformation and bogdonov chaotic substitution base...
Performance analysis of transformation and bogdonov chaotic substitution base...
 
Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...
 
Generation of Deepfake images using GAN and Least squares GAN.ppt
Generation of Deepfake images using GAN and Least squares GAN.pptGeneration of Deepfake images using GAN and Least squares GAN.ppt
Generation of Deepfake images using GAN and Least squares GAN.ppt
 
MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...
MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...
MUMS: Bayesian, Fiducial, and Frequentist Conference - Model Selection in the...
 
Synthetic Data Generation using exponential random Graph modeling
Synthetic Data Generation using exponential random Graph modelingSynthetic Data Generation using exponential random Graph modeling
Synthetic Data Generation using exponential random Graph modeling
 
Comparison of image segmentation
Comparison of image segmentationComparison of image segmentation
Comparison of image segmentation
 
MUMS Opening Workshop - An Overview of Reduced-Order Models and Emulators (ED...
MUMS Opening Workshop - An Overview of Reduced-Order Models and Emulators (ED...MUMS Opening Workshop - An Overview of Reduced-Order Models and Emulators (ED...
MUMS Opening Workshop - An Overview of Reduced-Order Models and Emulators (ED...
 
DWDM-AG-day-1-2023-SEC A plus Half B--.pdf
DWDM-AG-day-1-2023-SEC A plus Half B--.pdfDWDM-AG-day-1-2023-SEC A plus Half B--.pdf
DWDM-AG-day-1-2023-SEC A plus Half B--.pdf
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
 
Graph Neural Network in practice
Graph Neural Network in practiceGraph Neural Network in practice
Graph Neural Network in practice
 
Google BigQuery is a very popular enterprise warehouse that’s built with a co...
Google BigQuery is a very popular enterprise warehouse that’s built with a co...Google BigQuery is a very popular enterprise warehouse that’s built with a co...
Google BigQuery is a very popular enterprise warehouse that’s built with a co...
 
4 CG_U1_M3_PPT_4 DDA.pptx
4 CG_U1_M3_PPT_4 DDA.pptx4 CG_U1_M3_PPT_4 DDA.pptx
4 CG_U1_M3_PPT_4 DDA.pptx
 
maXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VIImaXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VII
 
Mask R-CNN
Mask R-CNNMask R-CNN
Mask R-CNN
 
data frames.pptx
data frames.pptxdata frames.pptx
data frames.pptx
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
httgc7rh9c
 

Recently uploaded (20)

FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 

Synthetic Image Data Generation using GAN &Triple GAN.pptx

  • 1. TRIPLE GAN M RUPESH KUMAR YADAV
  • 3. GENERATIV E MODELS Auto Regressive Models Variational Autoencoders (VAE ) Generative Adversarial Networks (GAN ) Flow based Generative Model
  • 4. •Need be trained on a large dataset of images •learns the conditional distribution of each pixel given the previous pixels •The model would generate the image one pixel at a time, conditioning on the previous pixels •May suffer from the problem of exposure bias •They can generate high-quality samples that are similar to the original data Auto Regressive Models •learns a bijective mapping between a simple base distribution and the target data distribution •The mapping is implemented as a series of invertible transformations •fast sampling, stable training and no need for specialized inference, easier to implement •Limited modelling power, Large memory requirements, Lack of diversity Flow based Models
  • 5. •VAEs learn a probabilistic mapping from data to a low- dimensional latent space • Generates output vectors that are similar, but not identical, to the source images •VAE introduces variability with mean and standard deviation layer while maintaining similarity to source images • Generate blurry outputs, and are unrealistic VAE •GANs learn a non-probabilistic mapping from random noise to data • Can generate highly realistic variations of real-world data • GAN models can fail to converge • GAN models can collapse and also computationally intensive •with mean and standard deviation layer while maintaining similarity to source images GAN
  • 6.
  • 7. GAN
  • 8. GAN : THE ADVERSARIAL GAME (2 PLAYER FORMULATION) ● GAN is formulated as a two-player game ● The Generator G takes a random noise z as input and produces a sample G(z) in the data space ● The discriminator D identifies whether a certain sample comes from the true data distribution p(x) or the generator. ● Both G and D are parameterized as deep neural networks and the training procedure is to solve a minimax problem ● pz(z) is a simple distribution
  • 9.
  • 10. HERE WE ARE TAKING BINARY CROSS ENTROPY TO COMPUTE LOSS FUNCTION
  • 11. ❖ ArgmaxD {V(G,D)} ❖ The Optimal Discriminator is D* G(x) = p(x)/(pg(x) + p(x)) in the nonparametric setting, and the global equilibrium of this game is achieved if and only if pg(x) = p(x) ❖ ArgmaxG {V(DG,D)} ❖ G* = ∫-log2(pG(x)+p(x)) + p(x)[log2 + log(p(x)/pG(x)+p(x))] ❖ G = ∫-log2(pG(x)+p(x)) + p(x)[log2 + log(p(x)/pG(x)+p(x))]
  • 12. PROBLEMS WITH GAN Mode Collapse Problem with Counting Mode Collapse occurs due to a sample or feature getting overfit and that fools the discriminator, Thus it is being outputted, It occurs due to over training
  • 13. PROBLEMS WITH GAN Problem with perspective Vanishing Gradient GAN is effected by the Vanishing Gradient Problem, Some features lose their importance over a period of time, After running for many iterations
  • 14. HARD TO ACHIEVE NASH EQUILIBRIUM
  • 15. PROBLEMS WITH GAN – AND DISCUSSIONS ❖ Two alternative training objectives that work well for either classification or image generation in SSL, but not both. They are : 1. Feature matching works well in classification but fails to generate indistinguishable samples 2. Minibatch discrimination is good at realistic image generation but cannot predict labels accurately ❖ Disentangling meaningful physical factors like the object category from the latent representations with limited supervision is of general interest Reason : A single discriminator network which has the sole role of distinguishing whether a data-label pair is from the real labeled dataset or not.
  • 16. Existing GANs in SSL have two problems: (1) the generator and the discriminator (i.e., the classifier) may not be optimal at the same time (2) the generator cannot control the semantics of the generated samples. The problems essentially arise from the two-player formulation, where a single discriminator shares incompatible roles of identifying fake samples and predicting labels and it only estimates the data without considering the labels
  • 18. TRIPLE GAN Triple generative adversarial network (Triple-GAN) framework for both classification and class-conditional image generation with limited supervision Two conditional networks—a Classifier and a Generator to generate fake labels given real data and fake data given real labels, which will perform the classification and class-conditional generation tasks respectively. To jointly justify the quality of the samples from the conditional networks, we define a discriminator network which has the sole role of distinguishing whether a data-label pair is from the real labeled dataset or not. The resulting model is called Triple-GAN because we consider three networks as well as three joint distributions, i.e., the true data-label distribution and the distributions defined by the two conditional networks
  • 19. OBJECTIVES OF TRIPLE GAN Characterize the process of Classification Class- conditional generation in SSL
  • 20. COMPONENTS OF TRIPLE GAN A classifier C that (approximately) characterizes the conditional distribution pc(y|x) ≈ p(y|x) A class-conditional generator G that (approximately) characterizes the conditional distribution in the other direction pg(x|y) ≈ p(x|y); and A discriminator D that distinguishes whether a pair of data (x, y) comes from the true distribution p(x, y). All the components are parameterized as neural networks
  • 21. THREE PLAYER FORMULATION In the game, after a sample x is drawn from p(x), C produces a fake label y given x following the conditional distribution pc(y|x). The fake input-label pair is a sample from the joint distribution pc(x, y) = p(x)pc(y|x). Similarly, a fake input-label pair is sampled from G by first drawing y ∼ p(y) and then drawing x|y ∼ pg(x|y), Hence from the joint distribution pg(x, y) = p(y)pg(x|y).For pg(x|y), we assume that x is transformed by the latent style variables z given the label y, namely, x = G(y, z), z ∼ pz(z), where pz(z) is a simple distribution (e.g., uniform or standard normal). The fake input-label pairs (x, y) generated by both C and G are sent to the discriminator D. D can also access the input-label pairs from the true data distribution as positive samples. Our desired equilibrium is that the joint distributions defined by the classifier and the generator both converge to the true data distribution
  • 22. LOSS FUNCTION The objective functions in the process as adversarial losses : minC,G max D Ep(x,y) [log D(x, y)] + αEpc(x,y) [log(1 − D(x, y))] +(1 − α)Epg(x,y) [log(1 − D(G(y, z), y))] where α ∈ (0, 1) is a constant that controls the relative importance of classification and generation for convenience α=1/2 .
  • 23. For any fixed C and G, the optimal D of the game defined by the utility function U(C, G, D) is: D*C,G(x, y) = p(x, y)/ (p(x, y) + pα(x, y)) , where pα(x, y) := (1 − α)pg(x, y) + αpc(x, y) is a mixture distribution for α ∈ (0, 1). V (C, G) = maxD U(C, G, D) V (C, G) = − log 4 + 2JSD(p(x, y)||pα(x, y))
  • 24. pα(x, y) := (1 − α)pg(x, y) + αpc(x, y) The equilibrium indicates that if one of C and G tends to the data distribution, the other will also go towards the data distribution, which addresses the competing problem Given p(x, y) = pα(x, y), the marginal distributions are the same for p, pc and pg, i.e. p(x) = pg(x) = pc(x) and p(y) = pg(y) = pc(y) However, it may not be unique, and we should minimize an additional objective to ensure the uniqueness
  • 25. The objective functions in the process as adversarial losses : minC,G max D Ep(x,y) [log D(x, y)] + αEpc(x,y) [log(1 − D(x, y))] +(1 − α)Epg(x,y) [log(1 − D(G(y, z), y))] +RC+αPRP where α ∈ (0, 1) ● Because label information is extremely insufficient in SSL, we propose pseudo discriminative loss RP = E pg [− log pc(y|x)] ● The Cross Entropy Loss to C RC = E (x,y)~p(x,y) [− log pc(y|x)]
  • 26. UPDATING THE WEIGHTS DURING BACKPROPAGATION
  • 27. DISENTANGLE THE CLASSES AND STYLES OF THE INPUT AND TRANSFER SMOOTHLY IN THE DATA SPACE VIA INTERPOLATION IN THE LATENT SPACE CLASS- CONDITIONALLY”. in simpler terms: ● To disentangle the classes and styles of the input means to separate the different categories (such as dogs or cats) and visual features (such as colour or shape) of the images that are given to the model. ● To transfer smoothly in the data space means to create new images that look realistic and natural by changing some aspects of the original images gradually. ● To do this via interpolation in the latent space means to use a mathematical technique that finds intermediate values between two points in a hidden representation of the data that captures its essential characteristics. ● To do this class-conditionally means to do this only for images that belong to the same category (such as dogs or cats), and not across different categories.
  • 30.
  • 32. ISSUES FACED C:/Users/rupes/AppData/Local/Programs/Python/Python310/python.exe"c:/rupesh/class _3rd_year/Miniproject/TripleGansResearch/TripleGansResearch800fcf5af3a0160802c880 1bdf2652c3d0aa53e2/tgan-code_cifar/triplegan.py" 2023-03-31 23:27:50.658522: W tensorflow/tsl/framework/cpu_allocator_impl.cc:83] Allocation of 253755392 exceeds 10% of free system memory. 2023-03-31 23:27:50.821873: W tensorflow/tsl/framework/cpu_allocator_impl.cc:83] Allocation of 253755392 exceeds 10% of free system memory. [*] Reading checkpoints... [*] Failed to find a checkpoint [!] Load failed... 2023-03-31 23:27:53.723193: W tensorflow/tsl/framework/cpu_allocator_impl.cc:83] Allocation of 105380352 exceeds 10% of free system memory. Epoch: [ 0] [ 0/1562] time: 28.2756, d_loss: 1.37041903, g_loss: 1.71234071, c_loss: 2.30251503
  • 33. Deep generative modeling still remains an active area of research with many challenges, such as evaluating the quality of generated samples and the prevention of mode collapse, which occurs when the generator starts producing similar or identical samples, leading to a collapse in the modes of the data distribution