Successfully reported this slideshow.

A practical guide to deep learning

26

Share

Loading in …3
×
1 of 102
1 of 102

More Related Content

A practical guide to deep learning

  1. 1. A PRACTICAL GUIDE TO DEEP LEARNING Tess Ferrandez – Microsoft - @TessFerrandez
  2. 2. from @teenybiscuit
  3. 3. FROM ML TO DEEP LEARNING Predicting the price of a house
  4. 4. int EstimatePrice(...){ price = 10000 + 6700 * area_in_sqm + 20000 * has_pool + 10000 * new_kitchen + 5000 * neighborhood_quality; return price; } Price = b + w1*area_in_sqm + w2*has_pool + ...
  5. 5. Price = b + w1*area_in_sqm [LINEAR REGRESSION] [GRADIENT DESCENT]
  6. 6. int EstimatePrice(...){ price = 10000 + 6700 * area_in_sqm + 20000 * has_pool + 10000 * new_kitchen + 5000 * neighborhood_quality; return price; } Price = b + w1*area_in_sqm + w2*has_pool + ... [LINEAR REGRESSION]
  7. 7. [NEURAL NET]
  8. 8. [NEURAL NET]
  9. 9. UNSTRUCTURED DATA Machine Learning on Images
  10. 10. [HISTOGRAMS]
  11. 11. [PURE PIXELS]
  12. 12. F. Chollet – Creator of Keras
  13. 13. [DENSLEY CONECTED] [CONVOLUTIONAL] [RECURRENT] NETWORK ARCHITECTURES
  14. 14. CONVOLUTIONAL NEURAL NETWORKS The basics
  15. 15. http://deeplearning.stanford.edu/wiki/index.php/Feature_extraction_using_convolution
  16. 16. https://en.wikipedia.org/wiki/Kernel_(image_processing)
  17. 17. 0*1+0*1+0*1 + 0*0+0*0+0*0 + 0*-1+0*-1+0*-1 = 01*1+1*1+1*1 + 1*0+1*0+1*0 + 0*-1+0*-1+0*-1 = 3
  18. 18. https://www.quora.com/How-can-l-explain-the-dimensionality-reduction-in-convolutional-neural-network-CNN-from-this-image
  19. 19. 0 0 2 3
  20. 20. layer 1 layer 2 layer 3 layer 4 layer 5 https://cs.nyu.edu/~fergus/papers/zeilerECCV2014.pdf
  21. 21. CNNs IN PRACTICE Finally time for some code
  22. 22. 1 PREPARE DATA CREATE MODEL TRAIN MODEL (UNTIL OVERFIT) GET MORE DATA OR ADD DROPOUT TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  23. 23. 1 PREPARE DATA CREATE MODEL TRAIN MODEL (UNTIL OVERFIT) GET MORE DATA OR ADD DROPOUT TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  24. 24. 1 PREPARE DATA CREATE MODEL TRAIN MODEL (UNTIL OVERFIT) GET MORE DATA OR ADD DROPOUT TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  25. 25. 1 PREPARE DATA CREATE MODEL TRAIN MODEL (UNTIL OVERFIT) GET MORE DATA OR ADD DROPOUT TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  26. 26. 1 EPOCH = 1 pass through the training data
  27. 27. Time for the Epoch Training data Validation data
  28. 28. MODEL LOSS ACCURACY BASIC 0.2507 91.05%
  29. 29. OOPSIE DOOPSIE! We’re overfitting
  30. 30. 1 PREPARE DATA CREATE MODEL TRAIN MODEL (UNTIL OVERFIT) GET MORE DATA OR ADD DROPOUT TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  31. 31. [DATA AUGMENATION]
  32. 32. Chihuahua the movie
  33. 33. [DROPOUT] http://jmlr.org/papers/v15/srivastava14a.html
  34. 34. 1 PREPARE DATA CREATE MODEL TRAIN MODEL (UNTIL OVERFIT) GET MORE DATA OR ADD DROPOUT TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  35. 35. 1 PREPARE DATA CREATE MODEL TRAIN MODEL (UNTIL OVERFIT) GET MORE DATA OR ADD DROPOUT TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  36. 36. PREDICTED Chihuahua Muffin TRUE ChihuahuaMuffin
  37. 37. MODEL LOSS ACCURACY BASIC 0.2507 91.05% AUGMENTATION 0.1988 93.68%
  38. 38. 1 PREPARE DATA CREATE MODEL TRAIN MODEL (UNTIL OVERFIT) GET MORE DATA OR ADD DROPOUT TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  39. 39. TRAINING ON PRETRAINED MODELS Feature Extraction and Transfer Learning
  40. 40. F. Chollet – Deep Learning with Python
  41. 41. 1 EXTRACT FEATURES FROM A PRE-TRAINED MODEL CREATE A SHALLOW NETWORK TO PREDICT2
  42. 42. 1 EXTRACT FEATURES FROM A PRE-TRAINED MODEL CREATE A SHALLOW NETWORK TO PREDICT2
  43. 43. 1 EXTRACT FEATURES FROM A PRE-TRAINED MODEL CREATE A SHALLOW NETWORK TO PREDICT2
  44. 44. 1 EXTRACT FEATURES FROM A PRE-TRAINED MODEL CREATE A SHALLOW NETWORK TO PREDICT2
  45. 45. MODEL LOSS ACCURACY BASIC 0.2507 91.05% AUGMENTATION 0.1988 93.68% FEATURE EXTR. 0.01253 99.47%
  46. 46. 1 ADD DENSE LAYERS ON TOP OF CONV. BASE FREEZE THE CONV. BASE TRAIN MODEL UNFREEZE SOME LAYERS TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  47. 47. 1 ADD DENSE LAYERS ON TOP OF CONV. BASE FREEZE THE CONV. BASE TRAIN MODEL UNFREEZE SOME LAYERS TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  48. 48. 1 ADD DENSE LAYERS ON TOP OF CONV. BASE FREEZE THE CONV. BASE TRAIN MODEL UNFREEZE SOME LAYERS TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  49. 49. MODEL LOSS ACCURACY BASIC 0.2507 91.05% AUGMENTATION 0.1988 93.68% FEATURE EXTR. 0.01253 99.47% TRANSFER LEARNING 0.01842 100%
  50. 50. 1 ADD DENSE LAYERS ON TOP OF CONV. BASE FREEZE THE CONV. BASE TRAIN MODEL UNFREEZE SOME LAYERS TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  51. 51. MODEL LOSS ACCURACY BASIC 0.2507 91.05% AUGMENTATION 0.1988 93.68% FEATURE EXTR. 0.01253 99.47% TRANSFER LEARNING 0.01842 100% TRANSFER UNFREEEZE 0.01081 99.47%
  52. 52. 1 ADD DENSE LAYERS ON TOP OF CONV. BASE FREEZE THE CONV. BASE TRAIN MODEL UNFREEZE SOME LAYERS TRAIN MODEL PREDICT ON TEST DATA 2 3 4 5 6
  53. 53. VISUALIZE THE NETWORK Understanding what it learns
  54. 54. [Grad-CAM Heatmaps]
  55. 55. layer 1 layer 2 layer 3 layer 4 layer 5 https://cs.nyu.edu/~fergus/papers/zeilerECCV2014.pdf
  56. 56. ADVANCED TOPICS Extra Extra!
  57. 57. GrabCut OpenCV http://www.australiandoglover.com/2016/05/chihuahua-breed-profile.html
  58. 58. [GENERATOR (forger)] NETWORK ARCHITECTURES [ORIGINALS] [DETECTOR (detective)]GENERATIVE ADVERSARIAL NETWORK Generating images
  59. 59. Alec Radford – DCGAN paper - https://arxiv.org/pdf/1511.06434.pdf
  60. 60. https://deepart.io/
  61. 61. Ian Goodfellow: Adversarial Examples
  62. 62. DeepFace from Facebook Image: Daily Mirror ONE SHOT LEARNING DeepFace and FaceNet
  63. 63. FaceNet from Google Image: https://omoindrot.github.io/triplet-loss
  64. 64. http://slideshare.net/Tess @TessFerrandez
  65. 65. QUICK, PRE-FAB AND EASY Cognitive Services
  66. 66. COMPUTER VISION Azure Cognitive Services
  67. 67. CUSTOM VISION Azure Cognitive Services
  68. 68. A PRACTICAL GUIDE TO DEEP LEARNING Tess Ferrandez – Microsoft - @TessFerrandez

×