cs 4803 7643 deep learning
play

CS 4803 / 7643: Deep Learning Topics: Specifying Layers Forward - PowerPoint PPT Presentation

CS 4803 / 7643: Deep Learning Topics: Specifying Layers Forward & Backward autodifferentiation (Beginning of) Convolutional neural networks Zsolt Kira Georgia Tech Projects We will release a set of project ideas for those


  1. CS 4803 / 7643: Deep Learning Topics: – Specifying Layers – Forward & Backward autodifferentiation – (Beginning of) Convolutional neural networks Zsolt Kira Georgia Tech

  2. Projects • We will release a set of project ideas for those that are having trouble coming up with them – NEW: Facebook will develop a set of project ideas as well, with some of their researchers involved – Should be released early/mid Feb. (C) Dhruv Batra & Zsolt Kira 2

  3. (C) Dhruv Batra & Zsolt Kira 3

  4. (C) Dhruv Batra & Zsolt Kira 4

  5. (C) Dhruv Batra & Zsolt Kira 5

  6. Types of Projects • Application – Image to cooking recipe – Voice cloning – Etc. – Need to modify/implement something ; not enough to just take code and run it • Rigorous empirical report – Have a hypothesis or something you’re trying to test – Perform rigorous experiments with many (reasonable) conditions that would support/refute your hypothesis • Reproduction of a paper – Not just running online code! • Theory • Novel new method – (not necessary for the project, good if goal is publishing!) (C) Dhruv Batra & Zsolt Kira 6

  7. Recap from last time (C) Dhruv Batra & Zsolt Kira 7

  8. Modularized implementation: forward / backward API x z * y (x,y,z are scalars) 8 Slide Credit: Fei-Fei Li, Justin Johnson, Serena Yeung, CS 231n

  9. Example: Forward mode AD + sin( ) * x 1 x 2 https://www.cc.gatech.edu/classes/AY2020/cs7643_spring/slides/autodiff_forward_reverse.pdf (C) Dhruv Batra & Zsolt Kira 9

  10. Example: Reverse mode AD + sin( ) * x 1 x 2 https://www.cc.gatech.edu/classes/AY2020/cs7643_spring/slides/autodiff_forward_reverse.pdf (C) Dhruv Batra & Zsolt Kira 10

  11. Fully Connected Layer Example: 200x200 image 40K hidden units ~2B parameters !!! - Spatial correlation is local - Waste of resources + we have not enough training samples anyway.. 11 Slide Credit: Marc'Aurelio Ranzato

  12. Locally Connected Layer Example: 200x200 image 40K hidden units “Filter” size: 10x10 4M parameters Note: This parameterization is good when input image is registered (e.g., face 12 Slide Credit: Marc'Aurelio Ranzato recognition).

  13. Locally Connected Layer STATIONARITY? Statistics similar at all locations 13 Slide Credit: Marc'Aurelio Ranzato

  14. Convolutional Layer Share the same parameters across different locations (assuming input is stationary): Convolutions with learned kernels 14 Slide Credit: Marc'Aurelio Ranzato

  15. How to implement this (and efficiently)?

  16. Convolutions for mathematicians • On operation on two functions and to produce a third function • E.g. input and kernel or weighting function (C) Peter Anderson 16

  17. Convolutions! • Math vs. CS vs. programming viewpoints (C) Dhruv Batra & Zsolt Kira 17

  18. Convolutions for mathematicians • On operation on two functions and to produce a third function • E.g. input and kernel or weighting function (C) Peter Anderson 18

  19. Convolutions for mathematicians • One dimension • Two dimensions 1 2 1 2 1 2 (C) Peter Anderson 19

  20. Convolutions for programmers y • Iterate over the kernel instead of the image • Implement cross-correlation instead of convolution • Later - implementation as matrix multiplication (C) Peter Anderson 20

  21. Discrete convolution • Discrete Convolution! • Very similar to correlation but associative 1D Convolution 2D Convolution Filter

  22. A note on sizes m N-m +1 N m N N-m +1 Filter Input Output MATLAB to the rescue! • conv2(x,w, ‘valid’)

  23. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 23 Slide Credit: Marc'Aurelio Ranzato

  24. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 24 Slide Credit: Marc'Aurelio Ranzato

  25. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 25 Slide Credit: Marc'Aurelio Ranzato

  26. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 26 Slide Credit: Marc'Aurelio Ranzato

  27. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 27 Slide Credit: Marc'Aurelio Ranzato

  28. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 28 Slide Credit: Marc'Aurelio Ranzato

  29. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 29 Slide Credit: Marc'Aurelio Ranzato

  30. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 30 Slide Credit: Marc'Aurelio Ranzato

  31. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 31 Slide Credit: Marc'Aurelio Ranzato

  32. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 32 Slide Credit: Marc'Aurelio Ranzato

  33. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 33 Slide Credit: Marc'Aurelio Ranzato

  34. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 34 Slide Credit: Marc'Aurelio Ranzato

  35. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 35 Slide Credit: Marc'Aurelio Ranzato

  36. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 36 Slide Credit: Marc'Aurelio Ranzato

  37. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 37 Slide Credit: Marc'Aurelio Ranzato

  38. Convolutional Layer (C) Dhruv Batra & Zsolt Kira 38 Slide Credit: Marc'Aurelio Ranzato

  39. Convolution Explained • http://setosa.io/ev/image-kernels/ • https://github.com/bruckner/deepViz (C) Dhruv Batra & Zsolt Kira 40

  40. Convolutional Layer Learn multiple filters. E.g.: 200x200 image 100 Filters Filter size: 10x10 10K parameters (C) Dhruv Batra & Zsolt Kira 41 Slide Credit: Marc'Aurelio Ranzato

  41. Convolution Layer 32x32x3 image -> preserve spatial structure height 32 width 32 depth 3 Slide Credit: Fei-Fei Li, Justin Johnson, Serena Yeung, CS 231n

  42. Convolution Layer 32x32x3 image 5x5x3 filter 32 Convolve the filter with the image i.e. “slide over the image spatially, computing dot products” 32 3 Slide Credit: Fei-Fei Li, Justin Johnson, Serena Yeung, CS 231n

  43. Convolution Layer Filters always extend the full depth of the input volume 32x32x3 image 5x5x3 filter 32 Convolve the filter with the image i.e. “slide over the image spatially, computing dot products” 32 3 Slide Credit: Fei-Fei Li, Justin Johnson, Serena Yeung, CS 231n

  44. Convolution Layer 32x32x3 image 5x5x3 filter 32 1 number: the result of taking a dot product between the filter and a small 5x5x3 chunk of the image 32 (i.e. 5*5*3 = 75-dimensional dot product + bias) 3 Slide Credit: Fei-Fei Li, Justin Johnson, Serena Yeung, CS 231n

  45. Convolution Layer activation map 32x32x3 image 5x5x3 filter 32 28 convolve (slide) over all spatial locations 28 32 3 1 Slide Credit: Fei-Fei Li, Justin Johnson, Serena Yeung, CS 231n

  46. consider a second, green filter Convolution Layer activation maps 32x32x3 image 5x5x3 filter 32 28 convolve (slide) over all spatial locations 28 32 3 1 Slide Credit: Fei-Fei Li, Justin Johnson, Serena Yeung, CS 231n

  47. For example, if we had 6 5x5 filters, we’ll get 6 separate activation maps: activation maps 32 28 Convolution Layer 28 32 3 6 We stack these up to get a “new image” of size 28x28x6! Slide Credit: Fei-Fei Li, Justin Johnson, Serena Yeung, CS 231n

  48. Im2Col (C) Dhruv Batra & Zsolt Kira 49 Figure Credit: https://petewarden.com/2015/04/20/why-gemm-is-at-the-heart-of-deep-learning/

  49. General Matrix Multiply (GEMM) (C) Dhruv Batra & Zsolt Kira 50 Figure Credit: https://petewarden.com/2015/04/20/why-gemm-is-at-the-heart-of-deep-learning/

  50. Preview: ConvNet is a sequence of Convolution Layers, interspersed with activation functions 32 28 CONV, ReLU e.g. 6 5x5x3 32 28 filters 3 6 Slide Credit: Fei-Fei Li, Justin Johnson, Serena Yeung, CS 231n

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend