26
Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit to He et al. Deep Residual Learning for Image Recognition In CVPR 2016

Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Deep Residual Learning for Image Recognition*

Wei-Pang Jan, Xuanqing Liu

* Most of the figures/tables credit to He et al. Deep Residual Learning for Image Recognition In CVPR 2016

Page 2: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Motivation

Page 3: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Revolution of Depth and Complexity

Page 4: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Revolution of Depth

Page 5: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Is deeper network better at learning?Gradient Vanishing/Exploding

http://neuralnetworksanddeeplearning.com/chap5.html

Page 6: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Batch NormalizationPrevents the gradient at each iteration from becoming too large or too small

S. Ioffe et al. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML 2015

Page 7: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Is deeper network better at learning?

Page 8: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

ResNet Intuitions

Page 9: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Identity MappingIf the “extra” layers are identity functions,

The network on the right should perform “at least” as well as the network on the left

Page 10: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Residual Learning(Plain net)

Page 11: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Residual Learning

F(x) = H(x) - x

Page 12: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Residual Learning - Match the Dimension

Weight

Weight Linear transformWx

When input/output channel don’t match:

Page 13: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Shortcuts

Feedforward low level feature to deeper layers

- Feature reuse- Reduces number of parameter

Resolves vanishing gradient

- y = f(x) vs. y = f(x) + x

Page 14: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Resolving Gradient Vanishing Problem

Page 15: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Bottleneck ArchitecturesCompress and then expand channel through 1x1 conv

Page 16: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Experiments

Page 17: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Architecture

Page 18: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

ImageNet Experiment Result

Page 19: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

CIFAR-10 Experiment Result

Page 20: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Identity vs. Projection Shortcuts

Page 21: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Result Comparison on ImageNet

Page 22: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Model Size

Page 23: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Strength & Weakness● Make super deep networks possible to train and generalize well ☺● Speed-up convergence ☺● Only consider about the depth, ignoring width

Page 24: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Questions?

Page 25: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Extension - ResNeXt

Xie et al. Aggregated Residual Transformations for Deep Neural Networks, in CVPR 2017.

Page 26: Deep Residual Learning for Image Recognition*yjlee/teaching/ecs289g... · Deep Residual Learning for Image Recognition* Wei-Pang Jan, Xuanqing Liu * Most of the figures/tables credit

Extension - DenseNet

Huang et al. Densely Connected Convolutional Networks, in CVPR 2017.