SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
Semi-supervised learning with GANs : putting together the pieces together
OLX Berlin Data Science Team
Classifieds
OLX in a glance
350+ million
active users
40+ countries
60+ million new
listings per month
Market leader
in 35 countries
How GANs help in a semi-supervised setup
Using Colaboratory to train a GAN for semi-supervised learning
Options for putting the model in production
What are GANs
Outline
Short Intro
Intro to Deep Learning
Convolution Neural Networks in two images - part 1
Source : https://www.mathworks.com/solutions/deep-learning/convolutional-neural-network.html
Convolution and Pooling
Source : https://cambridgespark.com/content/tutorials/convolutional-neural-networks-with-keras/index.html
Convolution Neural Networks in two images - part 2
http://machinelearninguru.com/computer_vision/basics/convolution/convolution_layer.html
Why does it work so well?
Hierarchical building block hypothesis
Source : https://medium.com/@johnsmart/your-personal-sim-pt-4-deep-agents-understanding-natural-intelligence-7040ae074b71
Sample Sizes for Deep Learning
Source : https://arxiv.org/pdf/1602.07332.pdf
Generative Adversarial Networks
Conceptual representation of a GAN
Source : https://stats.stackexchange.com/questions/277756/some-general-questions-on-generative-adversarial-networks
1D example of GAN
Source : https://ireneli.eu/2016/11/17/deep-learning-13-understanding-generative-adversarial-network/
GANs in one image
Source : https://news.developer.nvidia.com/edit-photos-with-gans
Types of GANs
Source : https://becominghuman.ai/unsupervised-image-to-image-translation-with-generative-adversarial-networks-adb3259b11b9
Limitations of GANs (1/3)
● Mode Collapse: Generator does not generate the full range of plausible samples
● More likely if the generator is optimized while the discriminator is kept constant for many iterations
Limitations of GANs (2/3)
● GANs predict the entire sample (e.g. image) at once
● Difficult to predict pixel neighborhoods
Limitations of GANs (3/3)
● Difficult training process / convergence: Generator and discriminator keep oscillating
● Network does not converge to a stable, (near) optimal solution
Semi-supervised learning with
GANs
Why using GANs in a semi-supervised setting?
● Create a more diverse set of unlabeled data
● Get a better / more descriptive decision boundary
● Improve generalization when the amount of training samples is small
Influence of unlabeled data in semi-supervised learning
● Continuity assumption
● Cluster assumption
● Manifold assumption
Example of GAN in a semi-supervised learning role
Source : https://towardsdatascience.com/semi-supervised-learning-with-gans-9f3cb128c5e
Sources of information and their role for the discriminator
● Real images that have labels, similar to normal supervised learning
● Real images that do not have labels. For those, the discriminator only learns that these images are
real
● Images coming from the generator. For those, the discriminator learns to classify as fake
What do we have to modify to make it work?
● Adjust the loss functions so that we tackle both problems:
○ as per the original GAN task, use binary cross entropy for the GAN part
○ as per multiclass classification task, use softmax cross entropy (or sparse cross entropy with
logits) for the supervised task
○ apply masks to ignore the label not seen in the respective subtask
○ take the average of the GAN and supervised loss
● The discriminator can use the generator’s images, as well as the labeled and unlabeled training data,
to classify the dataset
Improving the GAN part
● Training GANs is a challenging problem -> feature matching approach
a. take the moments for some features for a “real” minibatch
b. take the moments for same features for a “fake” minibatch
c. minimize mean absolute error between the two
Google Colaboratory
Google Colaboratory: Tensorflow + GPU + GDrive + Notebook + Free
Google Colaboratory
● What is Google Colaboratory?
● Tensorflow + GPU + GDrive + Notebook + Free
● Free (limited) use of GPUs for training
Interface - Show me the code
https://colab.research.google.com/drive/1CqlRvhhR3bT-NUgTmgH5S9OSHn2ABVYt#scrollTo=RA4eBhnzBZO3
Model Deployment Options -
Making endpoints
Deployment Options we will discuss
● Amazon Sagemaker
● AWS Lambda and Tensorflow
AWS SageMaker
AWS Sagemaker in the ML Stack
AWS Lambda
36
Applied Data Science Vision - Building the BasisAWS Lambda with Tensorflow
Resources
● Using Chalice to serve SageMaker predictions
○ https://medium.com/@julsimon/using-chalice-to-serve-sagemaker-predictions-a2015c02b033
● SageMaker examples
○ https://github.com/awslabs/amazon-sagemaker-examples
● How to Deploy Deep Learning Models with AWS Lambda and Tensorflow
○ https://aws.amazon.com/blogs/machine-learning/how-to-deploy-deep-learning-models-with-aws-la
mbda-and-tensorflow/
References
● Getting started with ML (Google)
○ https://drive.google.com/file/d/0B0phzgXZajPFZFRYNFRicjlZTVk/view
● Semi-supervised learning with Generative Adversarial Networks (GANs)
○ https://towardsdatascience.com/semi-supervised-learning-with-gans-9f3cb128c5e
● CNNs, three things you need to know
○ https://www.mathworks.com/solutions/deep-learning/convolutional-neural-network.html
● Semi-supervised learning
○ https://en.wikipedia.org/wiki/Semi-supervised_learning
● Variants of GANs
○ https://www.slideshare.net/thinkingfactory/variants-of-gans-jaejun-yoo
● From GAN to WGAN
○ https://lilianweng.github.io/lil-log/2017/08/20/from-GAN-to-WGAN.html
Questions and Discussion

Mais conteúdo relacionado

Semelhante a Semi-supervised learning with GANs

Predictive analytics semi-supervised learning with GANs
Predictive analytics   semi-supervised learning with GANsPredictive analytics   semi-supervised learning with GANs
Predictive analytics semi-supervised learning with GANsterek47
 
Reading group gan - 20170417
Reading group   gan - 20170417Reading group   gan - 20170417
Reading group gan - 20170417Shuai Zhang
 
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...gdgsurrey
 
GANs for Anti Money Laundering
GANs for Anti Money LaunderingGANs for Anti Money Laundering
GANs for Anti Money LaunderingJim Dowling
 
PyData Global: Thrifty Machine Learning
PyData Global: Thrifty Machine LearningPyData Global: Thrifty Machine Learning
PyData Global: Thrifty Machine LearningRebecca Bilbro
 
Face-GAN project report.pptx
Face-GAN project report.pptxFace-GAN project report.pptx
Face-GAN project report.pptxAndleebFatima16
 
Tutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GANTutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GANWuhyun Rico Shin
 
Machine learning-for-dummies-andrews-sobral-activeeon
Machine learning-for-dummies-andrews-sobral-activeeonMachine learning-for-dummies-andrews-sobral-activeeon
Machine learning-for-dummies-andrews-sobral-activeeonActiveeon
 
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud MLScaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud MLSeldon
 
Nips 2016 tutorial generative adversarial networks review
Nips 2016 tutorial  generative adversarial networks reviewNips 2016 tutorial  generative adversarial networks review
Nips 2016 tutorial generative adversarial networks reviewMinho Heo
 
Machine Learning for Dummies (without mathematics)
Machine Learning for Dummies (without mathematics)Machine Learning for Dummies (without mathematics)
Machine Learning for Dummies (without mathematics)ActiveEon
 
Web Traffic Time Series Forecasting
Web Traffic  Time Series ForecastingWeb Traffic  Time Series Forecasting
Web Traffic Time Series ForecastingBillTubbs
 
B4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearningB4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearningHoa Le
 
Andrew NG machine learning
Andrew NG machine learningAndrew NG machine learning
Andrew NG machine learningShareDocView.com
 
Generative Adversarial Network (GAN)
Generative Adversarial Network (GAN)Generative Adversarial Network (GAN)
Generative Adversarial Network (GAN)Prakhar Rastogi
 
Tuning 2.0: Advanced Optimization Techniques Webinar
Tuning 2.0: Advanced Optimization Techniques WebinarTuning 2.0: Advanced Optimization Techniques Webinar
Tuning 2.0: Advanced Optimization Techniques WebinarSigOpt
 
Session-based recommendations with recurrent neural networks
Session-based recommendations with recurrent neural networksSession-based recommendations with recurrent neural networks
Session-based recommendations with recurrent neural networksZimin Park
 
Intelligent Thumbnail Selection
Intelligent Thumbnail SelectionIntelligent Thumbnail Selection
Intelligent Thumbnail SelectionKamil Sindi
 
GNA 13552928 deep learning for GAN a.ppt
GNA 13552928 deep learning for GAN a.pptGNA 13552928 deep learning for GAN a.ppt
GNA 13552928 deep learning for GAN a.pptManiMaran230751
 

Semelhante a Semi-supervised learning with GANs (20)

Predictive analytics semi-supervised learning with GANs
Predictive analytics   semi-supervised learning with GANsPredictive analytics   semi-supervised learning with GANs
Predictive analytics semi-supervised learning with GANs
 
Reading group gan - 20170417
Reading group   gan - 20170417Reading group   gan - 20170417
Reading group gan - 20170417
 
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
Certification Study Group - Professional ML Engineer Session 3 (Machine Learn...
 
GANs for Anti Money Laundering
GANs for Anti Money LaunderingGANs for Anti Money Laundering
GANs for Anti Money Laundering
 
PyData Global: Thrifty Machine Learning
PyData Global: Thrifty Machine LearningPyData Global: Thrifty Machine Learning
PyData Global: Thrifty Machine Learning
 
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
 
Tutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GANTutorial: Image Generation and Image-to-Image Translation using GAN
Tutorial: Image Generation and Image-to-Image Translation using GAN
 
Machine learning-for-dummies-andrews-sobral-activeeon
Machine learning-for-dummies-andrews-sobral-activeeonMachine learning-for-dummies-andrews-sobral-activeeon
Machine learning-for-dummies-andrews-sobral-activeeon
 
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud MLScaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
Scaling TensorFlow Models for Training using multi-GPUs & Google Cloud ML
 
Nips 2016 tutorial generative adversarial networks review
Nips 2016 tutorial  generative adversarial networks reviewNips 2016 tutorial  generative adversarial networks review
Nips 2016 tutorial generative adversarial networks review
 
Machine Learning for Dummies (without mathematics)
Machine Learning for Dummies (without mathematics)Machine Learning for Dummies (without mathematics)
Machine Learning for Dummies (without mathematics)
 
Web Traffic Time Series Forecasting
Web Traffic  Time Series ForecastingWeb Traffic  Time Series Forecasting
Web Traffic Time Series Forecasting
 
B4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearningB4UConference_machine learning_deeplearning
B4UConference_machine learning_deeplearning
 
Andrew NG machine learning
Andrew NG machine learningAndrew NG machine learning
Andrew NG machine learning
 
Generative Adversarial Network (GAN)
Generative Adversarial Network (GAN)Generative Adversarial Network (GAN)
Generative Adversarial Network (GAN)
 
Tuning 2.0: Advanced Optimization Techniques Webinar
Tuning 2.0: Advanced Optimization Techniques WebinarTuning 2.0: Advanced Optimization Techniques Webinar
Tuning 2.0: Advanced Optimization Techniques Webinar
 
Session-based recommendations with recurrent neural networks
Session-based recommendations with recurrent neural networksSession-based recommendations with recurrent neural networks
Session-based recommendations with recurrent neural networks
 
Intelligent Thumbnail Selection
Intelligent Thumbnail SelectionIntelligent Thumbnail Selection
Intelligent Thumbnail Selection
 
GNA 13552928 deep learning for GAN a.ppt
GNA 13552928 deep learning for GAN a.pptGNA 13552928 deep learning for GAN a.ppt
GNA 13552928 deep learning for GAN a.ppt
 

Último

While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in collegessuser7a7cd61
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.natarajan8993
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理e4aez8ss
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectBoston Institute of Analytics
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFAAndrei Kaleshka
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 217djon017
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改yuu sss
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPTBoston Institute of Analytics
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsVICTOR MAESTRE RAMIREZ
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...ssuserf63bd7
 
Machine learning classification ppt.ppt
Machine learning classification  ppt.pptMachine learning classification  ppt.ppt
Machine learning classification ppt.pptamreenkhanum0307
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryJeremy Anderson
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our WorldEduminds Learning
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Colleen Farrelly
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...Amil Baba Dawood bangali
 

Último (20)

While-For-loop in python used in college
While-For-loop in python used in collegeWhile-For-loop in python used in college
While-For-loop in python used in college
 
RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.RABBIT: A CLI tool for identifying bots based on their GitHub events.
RABBIT: A CLI tool for identifying bots based on their GitHub events.
 
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
科罗拉多大学波尔得分校毕业证学位证成绩单-可办理
 
Heart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis ProjectHeart Disease Classification Report: A Data Analysis Project
Heart Disease Classification Report: A Data Analysis Project
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
How we prevented account sharing with MFA
How we prevented account sharing with MFAHow we prevented account sharing with MFA
How we prevented account sharing with MFA
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2Easter Eggs From Star Wars and in cars 1 and 2
Easter Eggs From Star Wars and in cars 1 and 2
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
专业一比一美国俄亥俄大学毕业证成绩单pdf电子版制作修改
 
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default  Presentation : Data Analysis Project PPTPredictive Analysis for Loan Default  Presentation : Data Analysis Project PPT
Predictive Analysis for Loan Default Presentation : Data Analysis Project PPT
 
Advanced Machine Learning for Business Professionals
Advanced Machine Learning for Business ProfessionalsAdvanced Machine Learning for Business Professionals
Advanced Machine Learning for Business Professionals
 
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
Statistics, Data Analysis, and Decision Modeling, 5th edition by James R. Eva...
 
Machine learning classification ppt.ppt
Machine learning classification  ppt.pptMachine learning classification  ppt.ppt
Machine learning classification ppt.ppt
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
Defining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data StoryDefining Constituents, Data Vizzes and Telling a Data Story
Defining Constituents, Data Vizzes and Telling a Data Story
 
Learn How Data Science Changes Our World
Learn How Data Science Changes Our WorldLearn How Data Science Changes Our World
Learn How Data Science Changes Our World
 
Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024Generative AI for Social Good at Open Data Science East 2024
Generative AI for Social Good at Open Data Science East 2024
 
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
NO1 Certified Black Magic Specialist Expert Amil baba in Lahore Islamabad Raw...
 

Semi-supervised learning with GANs

  • 1. Semi-supervised learning with GANs : putting together the pieces together OLX Berlin Data Science Team
  • 3. OLX in a glance 350+ million active users 40+ countries 60+ million new listings per month Market leader in 35 countries
  • 4. How GANs help in a semi-supervised setup Using Colaboratory to train a GAN for semi-supervised learning Options for putting the model in production What are GANs Outline Short Intro
  • 5. Intro to Deep Learning
  • 6. Convolution Neural Networks in two images - part 1 Source : https://www.mathworks.com/solutions/deep-learning/convolutional-neural-network.html
  • 7. Convolution and Pooling Source : https://cambridgespark.com/content/tutorials/convolutional-neural-networks-with-keras/index.html
  • 8. Convolution Neural Networks in two images - part 2 http://machinelearninguru.com/computer_vision/basics/convolution/convolution_layer.html
  • 9. Why does it work so well?
  • 10. Hierarchical building block hypothesis Source : https://medium.com/@johnsmart/your-personal-sim-pt-4-deep-agents-understanding-natural-intelligence-7040ae074b71
  • 11. Sample Sizes for Deep Learning Source : https://arxiv.org/pdf/1602.07332.pdf
  • 13. Conceptual representation of a GAN Source : https://stats.stackexchange.com/questions/277756/some-general-questions-on-generative-adversarial-networks
  • 14. 1D example of GAN Source : https://ireneli.eu/2016/11/17/deep-learning-13-understanding-generative-adversarial-network/
  • 15. GANs in one image Source : https://news.developer.nvidia.com/edit-photos-with-gans
  • 16. Types of GANs Source : https://becominghuman.ai/unsupervised-image-to-image-translation-with-generative-adversarial-networks-adb3259b11b9
  • 17. Limitations of GANs (1/3) ● Mode Collapse: Generator does not generate the full range of plausible samples ● More likely if the generator is optimized while the discriminator is kept constant for many iterations
  • 18. Limitations of GANs (2/3) ● GANs predict the entire sample (e.g. image) at once ● Difficult to predict pixel neighborhoods
  • 19. Limitations of GANs (3/3) ● Difficult training process / convergence: Generator and discriminator keep oscillating ● Network does not converge to a stable, (near) optimal solution
  • 21. Why using GANs in a semi-supervised setting? ● Create a more diverse set of unlabeled data ● Get a better / more descriptive decision boundary ● Improve generalization when the amount of training samples is small
  • 22. Influence of unlabeled data in semi-supervised learning ● Continuity assumption ● Cluster assumption ● Manifold assumption
  • 23. Example of GAN in a semi-supervised learning role Source : https://towardsdatascience.com/semi-supervised-learning-with-gans-9f3cb128c5e
  • 24. Sources of information and their role for the discriminator ● Real images that have labels, similar to normal supervised learning ● Real images that do not have labels. For those, the discriminator only learns that these images are real ● Images coming from the generator. For those, the discriminator learns to classify as fake
  • 25. What do we have to modify to make it work? ● Adjust the loss functions so that we tackle both problems: ○ as per the original GAN task, use binary cross entropy for the GAN part ○ as per multiclass classification task, use softmax cross entropy (or sparse cross entropy with logits) for the supervised task ○ apply masks to ignore the label not seen in the respective subtask ○ take the average of the GAN and supervised loss ● The discriminator can use the generator’s images, as well as the labeled and unlabeled training data, to classify the dataset
  • 26. Improving the GAN part ● Training GANs is a challenging problem -> feature matching approach a. take the moments for some features for a “real” minibatch b. take the moments for same features for a “fake” minibatch c. minimize mean absolute error between the two
  • 28. Google Colaboratory: Tensorflow + GPU + GDrive + Notebook + Free
  • 29. Google Colaboratory ● What is Google Colaboratory? ● Tensorflow + GPU + GDrive + Notebook + Free ● Free (limited) use of GPUs for training
  • 30. Interface - Show me the code https://colab.research.google.com/drive/1CqlRvhhR3bT-NUgTmgH5S9OSHn2ABVYt#scrollTo=RA4eBhnzBZO3
  • 31. Model Deployment Options - Making endpoints
  • 32. Deployment Options we will discuss ● Amazon Sagemaker ● AWS Lambda and Tensorflow
  • 34. AWS Sagemaker in the ML Stack
  • 36. 36 Applied Data Science Vision - Building the BasisAWS Lambda with Tensorflow
  • 37. Resources ● Using Chalice to serve SageMaker predictions ○ https://medium.com/@julsimon/using-chalice-to-serve-sagemaker-predictions-a2015c02b033 ● SageMaker examples ○ https://github.com/awslabs/amazon-sagemaker-examples ● How to Deploy Deep Learning Models with AWS Lambda and Tensorflow ○ https://aws.amazon.com/blogs/machine-learning/how-to-deploy-deep-learning-models-with-aws-la mbda-and-tensorflow/
  • 38. References ● Getting started with ML (Google) ○ https://drive.google.com/file/d/0B0phzgXZajPFZFRYNFRicjlZTVk/view ● Semi-supervised learning with Generative Adversarial Networks (GANs) ○ https://towardsdatascience.com/semi-supervised-learning-with-gans-9f3cb128c5e ● CNNs, three things you need to know ○ https://www.mathworks.com/solutions/deep-learning/convolutional-neural-network.html ● Semi-supervised learning ○ https://en.wikipedia.org/wiki/Semi-supervised_learning ● Variants of GANs ○ https://www.slideshare.net/thinkingfactory/variants-of-gans-jaejun-yoo ● From GAN to WGAN ○ https://lilianweng.github.io/lil-log/2017/08/20/from-GAN-to-WGAN.html