SlideShare a Scribd company logo
1 of 21
Generative Adversarial
Networks
What are GANs?
 System of two neural networks competing against each
other in a zero-sum game framework.
 They were first introduced by Ian Goodfellow et al. in
2014.
 Can learn to draw samples from a model that is similar
to data that we give them.
Slide credit – Victor Garcia
Components of GANs
Noise
Overview of GANs
Source: https://ishmaelbelghazi.github.io/ALI
Discriminative Models
 A discriminative model learns a function that maps the input
data (x) to some desired output class label (y).
 In probabilistic terms, they directly learn the conditional
distribution P(y|x).
Generative Models
 A generative model tries to learn the joint probability of the
input data and labels simultaneously i.e. P(x,y).
 Potential to understand and explain the underlying structure of
the input data even when there are no labels.
How GANs are being used?
 Applied for modelling natural images.
 Performance is fairly good in comparison to other
generative models.
 Useful for unsupervised learning tasks.
Why GANs?
 Use a latent code.
 Asymptotically consistent (unlike variational
methods) .
 No Markov chains needed.
 Often regarded as producing the best samples.
How to train GANs?
 Objective of generative network - increase the error rate of the
discriminative network.
 Objective of discriminative network – decrease binary
classification loss.
 Discriminator training - backprop from a binary
classification loss.
 Generator training - backprop the negation of the binary
classification loss of the discriminator.
Generator Discriminator
Loss Functions
Generated bedrooms. Source: “Unsupervised Representation Learning with Deep Convolutional Generative
Adversarial Networks” https://arxiv.org/abs/1511.06434v2
“Improved Techniques for Training GANs”
by Salimans et. al
 One-sided Label smoothing - replaces the 0 and 1 targets for a
classifier with smoothed values, like .9 or .1 to reduce the
vulnerability of neural networks to adversarial examples.
 Virtual batch Normalization - each example x is normalized
based on the statistics collected on a reference batch of examples
that are chosen once and fixed at the start of training, and on x
itself.
Original CIFAR-10 vs. Generated CIFAR-10 samples
Source: “Improved Techniques for Training GANs” https://arxiv.org/abs/1606.03498
Variations to GANs
 Several new concepts built on top of GANs have been
introduced –
InfoGAN – Approximate the data distribution and learn
interpretable, useful vector representations of data.
Conditional GANs - Able to generate samples taking into
account external information (class label, text, another
image). Force G to generate a particular type of output.
Major Difficulties
 Networks are difficult to converge.
 Ideal goal – Generator and discriminator to reach some
desired equilibrium but this is rare.
 GANs are yet to converge on large problems (E.g.
Imagenet).
Common Failure Cases
 The discriminator becomes too strong too quickly and the
generator ends up not learning anything.
 The generator only learns very specific weaknesses of the
discriminator.
 The generator learns only a very small subset of the true data
distribution.
So what can we do?
 Normalize the inputs
 A modified loss function
 Use a spherical Z
 BatchNorm
 Avoid Sparse Gradients: ReLU, MaxPool
 Use Soft and Noisy Labels
 DCGAN / Hybrid Models
 Track failures early (D loss goes to 0: failure mode)
 If you have labels, use them
 Add noise to inputs, decay over time
Conclusions
 Train GAN – Use discriminator as base model for transfer
learning and the fine-tuning of a production model.
 A well-trained generator has learned the true data distribution
well - Use generator as a source of data that is used to train a
production model.
Dive Deeper?
Ian Goodfellow’s NIPS 2016 Tutorial
Available online.
References
 https://tryolabs.com/blog/2016/12/06/major-advancements-deep-learning-2016/
 https://blog.waya.ai/introduction-to-gans-a-boxing-match-b-w-neural-nets-
b4e5319cc935#.6l7zh8u50
 https://en.wikipedia.org/wiki/Generative_adversarial_networks
 http://blog.aylien.com/introduction-generative-adversarial-networks-code-
tensorflow/
 https://github.com/soumith/ganhacks

More Related Content

Similar to GNA 13552928 deep learning for GAN a.ppt

AI & ML in Defence Systems - Sunil Chomal
AI & ML in Defence Systems   - Sunil ChomalAI & ML in Defence Systems   - Sunil Chomal
AI & ML in Defence Systems - Sunil ChomalSunil Chomal
 
DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101Felipe Prado
 
Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...PyData
 
Semi-supervised learning with GANs
Semi-supervised learning with GANsSemi-supervised learning with GANs
Semi-supervised learning with GANsterek47
 
GANs for Anti Money Laundering
GANs for Anti Money LaunderingGANs for Anti Money Laundering
GANs for Anti Money LaunderingJim Dowling
 
Generative Adversarial Networks and Their Applications in Medical Imaging
Generative Adversarial Networks  and Their Applications in Medical ImagingGenerative Adversarial Networks  and Their Applications in Medical Imaging
Generative Adversarial Networks and Their Applications in Medical ImagingSanghoon Hong
 
Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...Universitat Politècnica de Catalunya
 
Face-GAN project report.pptx
Face-GAN project report.pptxFace-GAN project report.pptx
Face-GAN project report.pptxAndleebFatima16
 
Deep DGA: Adversarially-Tuned Domain Generation and Detection
Deep DGA: Adversarially-Tuned Domain Generation and DetectionDeep DGA: Adversarially-Tuned Domain Generation and Detection
Deep DGA: Adversarially-Tuned Domain Generation and DetectionAshwini Almad
 
Machine Duping 101: Pwning Deep Learning Systems
Machine Duping 101: Pwning Deep Learning SystemsMachine Duping 101: Pwning Deep Learning Systems
Machine Duping 101: Pwning Deep Learning SystemsClarence Chio
 
Generative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsGenerative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsArtifacia
 
An Extensive Review on Generative Adversarial Networks GAN’s
An Extensive Review on Generative Adversarial Networks GAN’sAn Extensive Review on Generative Adversarial Networks GAN’s
An Extensive Review on Generative Adversarial Networks GAN’sijtsrd
 
xGem Machine Learning
xGem Machine LearningxGem Machine Learning
xGem Machine LearningJorge Hirtz
 
Machine learning - xGem - AI
Machine learning - xGem - AIMachine learning - xGem - AI
Machine learning - xGem - AIJuan Carniglia
 
brief Introduction to Different Kinds of GANs
brief Introduction to Different Kinds of GANsbrief Introduction to Different Kinds of GANs
brief Introduction to Different Kinds of GANsParham Zilouchian
 
Gans - Generative Adversarial Nets
Gans - Generative Adversarial NetsGans - Generative Adversarial Nets
Gans - Generative Adversarial NetsSajalRastogi8
 
Kaggle presentation
Kaggle presentationKaggle presentation
Kaggle presentationHJ van Veen
 
GANs Presentation.pptx
GANs Presentation.pptxGANs Presentation.pptx
GANs Presentation.pptxMAHMOUD729246
 

Similar to GNA 13552928 deep learning for GAN a.ppt (20)

gan.pdf
gan.pdfgan.pdf
gan.pdf
 
AI & ML in Defence Systems - Sunil Chomal
AI & ML in Defence Systems   - Sunil ChomalAI & ML in Defence Systems   - Sunil Chomal
AI & ML in Defence Systems - Sunil Chomal
 
DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101DEF CON 24 - Clarence Chio - machine duping 101
DEF CON 24 - Clarence Chio - machine duping 101
 
Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...Using GANs to improve generalization in a semi-supervised setting - trying it...
Using GANs to improve generalization in a semi-supervised setting - trying it...
 
Semi-supervised learning with GANs
Semi-supervised learning with GANsSemi-supervised learning with GANs
Semi-supervised learning with GANs
 
GANs for Anti Money Laundering
GANs for Anti Money LaunderingGANs for Anti Money Laundering
GANs for Anti Money Laundering
 
Generative Adversarial Networks and Their Applications in Medical Imaging
Generative Adversarial Networks  and Their Applications in Medical ImagingGenerative Adversarial Networks  and Their Applications in Medical Imaging
Generative Adversarial Networks and Their Applications in Medical Imaging
 
Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...Deep Learning for Computer Vision: Generative models and adversarial training...
Deep Learning for Computer Vision: Generative models and adversarial training...
 
Face-GAN project report.pptx
Face-GAN project report.pptxFace-GAN project report.pptx
Face-GAN project report.pptx
 
Face-GAN project report
Face-GAN project reportFace-GAN project report
Face-GAN project report
 
Deep DGA: Adversarially-Tuned Domain Generation and Detection
Deep DGA: Adversarially-Tuned Domain Generation and DetectionDeep DGA: Adversarially-Tuned Domain Generation and Detection
Deep DGA: Adversarially-Tuned Domain Generation and Detection
 
Machine Duping 101: Pwning Deep Learning Systems
Machine Duping 101: Pwning Deep Learning SystemsMachine Duping 101: Pwning Deep Learning Systems
Machine Duping 101: Pwning Deep Learning Systems
 
Generative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their ApplicationsGenerative Adversarial Networks and Their Applications
Generative Adversarial Networks and Their Applications
 
An Extensive Review on Generative Adversarial Networks GAN’s
An Extensive Review on Generative Adversarial Networks GAN’sAn Extensive Review on Generative Adversarial Networks GAN’s
An Extensive Review on Generative Adversarial Networks GAN’s
 
xGem Machine Learning
xGem Machine LearningxGem Machine Learning
xGem Machine Learning
 
Machine learning - xGem - AI
Machine learning - xGem - AIMachine learning - xGem - AI
Machine learning - xGem - AI
 
brief Introduction to Different Kinds of GANs
brief Introduction to Different Kinds of GANsbrief Introduction to Different Kinds of GANs
brief Introduction to Different Kinds of GANs
 
Gans - Generative Adversarial Nets
Gans - Generative Adversarial NetsGans - Generative Adversarial Nets
Gans - Generative Adversarial Nets
 
Kaggle presentation
Kaggle presentationKaggle presentation
Kaggle presentation
 
GANs Presentation.pptx
GANs Presentation.pptxGANs Presentation.pptx
GANs Presentation.pptx
 

More from ManiMaran230751

one shot15729752 Deep Learning for AI and DS
one shot15729752 Deep Learning for AI and DSone shot15729752 Deep Learning for AI and DS
one shot15729752 Deep Learning for AI and DSManiMaran230751
 
Deep-Learning-2017-Lecture ML DL RNN.ppt
Deep-Learning-2017-Lecture  ML DL RNN.pptDeep-Learning-2017-Lecture  ML DL RNN.ppt
Deep-Learning-2017-Lecture ML DL RNN.pptManiMaran230751
 
14889574 dl ml RNN Deeplearning MMMm.ppt
14889574 dl ml RNN Deeplearning MMMm.ppt14889574 dl ml RNN Deeplearning MMMm.ppt
14889574 dl ml RNN Deeplearning MMMm.pptManiMaran230751
 
12337673 deep learning RNN RNN DL ML sa.ppt
12337673 deep learning RNN RNN DL ML sa.ppt12337673 deep learning RNN RNN DL ML sa.ppt
12337673 deep learning RNN RNN DL ML sa.pptManiMaran230751
 
HADOOP AND MAPREDUCE ARCHITECTURE-Unit-5.ppt
HADOOP AND MAPREDUCE ARCHITECTURE-Unit-5.pptHADOOP AND MAPREDUCE ARCHITECTURE-Unit-5.ppt
HADOOP AND MAPREDUCE ARCHITECTURE-Unit-5.pptManiMaran230751
 
Reinforcemnet Leaning in ML and DL.pptx
Reinforcemnet Leaning in ML and  DL.pptxReinforcemnet Leaning in ML and  DL.pptx
Reinforcemnet Leaning in ML and DL.pptxManiMaran230751
 
24.09.2021 Reinforcement Learning Algorithms.pptx
24.09.2021 Reinforcement Learning Algorithms.pptx24.09.2021 Reinforcement Learning Algorithms.pptx
24.09.2021 Reinforcement Learning Algorithms.pptxManiMaran230751
 
The Stochastic Network Calculus: A Modern Approach.pptx
The Stochastic Network Calculus: A Modern Approach.pptxThe Stochastic Network Calculus: A Modern Approach.pptx
The Stochastic Network Calculus: A Modern Approach.pptxManiMaran230751
 
Open Access and IR along with Quality Indicators.pptx
Open Access and IR along with Quality Indicators.pptxOpen Access and IR along with Quality Indicators.pptx
Open Access and IR along with Quality Indicators.pptxManiMaran230751
 

More from ManiMaran230751 (11)

one shot15729752 Deep Learning for AI and DS
one shot15729752 Deep Learning for AI and DSone shot15729752 Deep Learning for AI and DS
one shot15729752 Deep Learning for AI and DS
 
Deep-Learning-2017-Lecture ML DL RNN.ppt
Deep-Learning-2017-Lecture  ML DL RNN.pptDeep-Learning-2017-Lecture  ML DL RNN.ppt
Deep-Learning-2017-Lecture ML DL RNN.ppt
 
14889574 dl ml RNN Deeplearning MMMm.ppt
14889574 dl ml RNN Deeplearning MMMm.ppt14889574 dl ml RNN Deeplearning MMMm.ppt
14889574 dl ml RNN Deeplearning MMMm.ppt
 
12337673 deep learning RNN RNN DL ML sa.ppt
12337673 deep learning RNN RNN DL ML sa.ppt12337673 deep learning RNN RNN DL ML sa.ppt
12337673 deep learning RNN RNN DL ML sa.ppt
 
HADOOP AND MAPREDUCE ARCHITECTURE-Unit-5.ppt
HADOOP AND MAPREDUCE ARCHITECTURE-Unit-5.pptHADOOP AND MAPREDUCE ARCHITECTURE-Unit-5.ppt
HADOOP AND MAPREDUCE ARCHITECTURE-Unit-5.ppt
 
Reinforcemnet Leaning in ML and DL.pptx
Reinforcemnet Leaning in ML and  DL.pptxReinforcemnet Leaning in ML and  DL.pptx
Reinforcemnet Leaning in ML and DL.pptx
 
24.09.2021 Reinforcement Learning Algorithms.pptx
24.09.2021 Reinforcement Learning Algorithms.pptx24.09.2021 Reinforcement Learning Algorithms.pptx
24.09.2021 Reinforcement Learning Algorithms.pptx
 
The Stochastic Network Calculus: A Modern Approach.pptx
The Stochastic Network Calculus: A Modern Approach.pptxThe Stochastic Network Calculus: A Modern Approach.pptx
The Stochastic Network Calculus: A Modern Approach.pptx
 
Open Access and IR along with Quality Indicators.pptx
Open Access and IR along with Quality Indicators.pptxOpen Access and IR along with Quality Indicators.pptx
Open Access and IR along with Quality Indicators.pptx
 
Fundamentals of RL.pptx
Fundamentals of RL.pptxFundamentals of RL.pptx
Fundamentals of RL.pptx
 
Acoustic Model.pptx
Acoustic Model.pptxAcoustic Model.pptx
Acoustic Model.pptx
 

Recently uploaded

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Recently uploaded (20)

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

GNA 13552928 deep learning for GAN a.ppt

  • 2. What are GANs?  System of two neural networks competing against each other in a zero-sum game framework.  They were first introduced by Ian Goodfellow et al. in 2014.  Can learn to draw samples from a model that is similar to data that we give them.
  • 3. Slide credit – Victor Garcia Components of GANs Noise
  • 4. Overview of GANs Source: https://ishmaelbelghazi.github.io/ALI
  • 5. Discriminative Models  A discriminative model learns a function that maps the input data (x) to some desired output class label (y).  In probabilistic terms, they directly learn the conditional distribution P(y|x).
  • 6. Generative Models  A generative model tries to learn the joint probability of the input data and labels simultaneously i.e. P(x,y).  Potential to understand and explain the underlying structure of the input data even when there are no labels.
  • 7. How GANs are being used?  Applied for modelling natural images.  Performance is fairly good in comparison to other generative models.  Useful for unsupervised learning tasks.
  • 8. Why GANs?  Use a latent code.  Asymptotically consistent (unlike variational methods) .  No Markov chains needed.  Often regarded as producing the best samples.
  • 9.
  • 10. How to train GANs?  Objective of generative network - increase the error rate of the discriminative network.  Objective of discriminative network – decrease binary classification loss.  Discriminator training - backprop from a binary classification loss.  Generator training - backprop the negation of the binary classification loss of the discriminator.
  • 12. Generated bedrooms. Source: “Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks” https://arxiv.org/abs/1511.06434v2
  • 13. “Improved Techniques for Training GANs” by Salimans et. al  One-sided Label smoothing - replaces the 0 and 1 targets for a classifier with smoothed values, like .9 or .1 to reduce the vulnerability of neural networks to adversarial examples.  Virtual batch Normalization - each example x is normalized based on the statistics collected on a reference batch of examples that are chosen once and fixed at the start of training, and on x itself.
  • 14. Original CIFAR-10 vs. Generated CIFAR-10 samples Source: “Improved Techniques for Training GANs” https://arxiv.org/abs/1606.03498
  • 15. Variations to GANs  Several new concepts built on top of GANs have been introduced – InfoGAN – Approximate the data distribution and learn interpretable, useful vector representations of data. Conditional GANs - Able to generate samples taking into account external information (class label, text, another image). Force G to generate a particular type of output.
  • 16. Major Difficulties  Networks are difficult to converge.  Ideal goal – Generator and discriminator to reach some desired equilibrium but this is rare.  GANs are yet to converge on large problems (E.g. Imagenet).
  • 17. Common Failure Cases  The discriminator becomes too strong too quickly and the generator ends up not learning anything.  The generator only learns very specific weaknesses of the discriminator.  The generator learns only a very small subset of the true data distribution.
  • 18. So what can we do?  Normalize the inputs  A modified loss function  Use a spherical Z  BatchNorm  Avoid Sparse Gradients: ReLU, MaxPool  Use Soft and Noisy Labels  DCGAN / Hybrid Models  Track failures early (D loss goes to 0: failure mode)  If you have labels, use them  Add noise to inputs, decay over time
  • 19. Conclusions  Train GAN – Use discriminator as base model for transfer learning and the fine-tuning of a production model.  A well-trained generator has learned the true data distribution well - Use generator as a source of data that is used to train a production model.
  • 20. Dive Deeper? Ian Goodfellow’s NIPS 2016 Tutorial Available online.
  • 21. References  https://tryolabs.com/blog/2016/12/06/major-advancements-deep-learning-2016/  https://blog.waya.ai/introduction-to-gans-a-boxing-match-b-w-neural-nets- b4e5319cc935#.6l7zh8u50  https://en.wikipedia.org/wiki/Generative_adversarial_networks  http://blog.aylien.com/introduction-generative-adversarial-networks-code- tensorflow/  https://github.com/soumith/ganhacks

Editor's Notes

  1. Unsupervised Machine Learning System of two neural networks competing against each other in a zero sum game framework Introduced in 2014 by Ian Goodfellow Generative and Discriminative Draw samples from a model that is similar to the data given to it
  2. 1. Examples – SVMs, Logistic Regression
  3. 1. This can be converted to P(y|x) for classification via Bayes rule, but the generative ability could be used for something else as well, such as creating likely new (x, y) samples.
  4. Other generative models – Naïve Bayes, Hidden Markov model etc. MLE estimates – Fixed set – Map to real world data – Select best set of parameters.
  5. 1. Asymptotically stable – Related to convergence – equilibrium points as t goes to infinity
  6. Generator is typically a deconvolutional neural network, and the discriminator is a convolutional neural network. Goal – Find a setting of parameters that makes generated data look like the training data to the discriminator network.
  7. Batch normalization greatly improves optimization of neural networks, and was shown to be highly effective for DCGANs. It causes the output of a neural network for an input example x to be highly dependent on several other inputs x 0 in the same minibatch. The reference batch is normalized using only its own statistics. VBN is computationally expensive because it requires running forward propagation on two minibatches of data, so we use it only in the generator network
  8. 1. “On small problems, they sometimes converge and sometimes don’t.  On large problems, like modeling ImageNet at 128x128 resolution, I’ve never seen them converge yet.” – Ian Goodfellow
  9. 1. The discriminator classifies generated data as fake so accurately and confidently that there is nothing in the discriminator’s back-propagated loss function gradients for the generator to learn. 2. Takes advantage of these to trick the discriminator into classifying generated data as real instead of learning to represent the true data distribution. 3. An example of this occurring in practice is the case where for every possible input, the generator is generating the same data sample and there is no variation among it’s outputs.
  10. normalize the images between -1 and 1. Tanh as the last layer of the generator output. min (log 1-D) vanishing gradients early on. Use max log D. Flip labels when training generator: real = fake, fake = real Sample from a gaussian distribution instead of a Uniform distribution Construct different mini-batches for real and fake, i.e. each mini-batch needs to contain only all real images or all generated images. the stability of the GAN game suffers if you have sparse gradients Label Smoothing, i.e. if you have two target labels: Real=1 and Fake=0, then for each incoming sample, if it is real, then replace the label with a random number between 0.7 and 1.2, and if it is a fake sample, replace it with 0.0 and 0.3 (for example).