caffeの特徴と最近の動向 -cnn、そしてrnnへ-

Post on 12-Apr-2017

345 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Caffeの特徴と最近の動向 - CNN、そしてRNNへ -

2017/03/21

1

・株式会社イーグル CTO

・先端IT活用推進コンソーシアム     クラウドテクノロジー活用部会 サブリーダー

https://www.facebook.com/yasuyuki.sugai

よろしくお願いしまーす ※この資料の内容は、

個人の見解です

自己紹介

菅井 康之

http://www.slideshare.net/yasuyukisugai/deep-learningcaffe

←Caffeを利用したハンズオン勉強会を 過去に開催(細かいことはこっちで。。)

今日は私の特徴量だけでも覚えて帰ってもらえればと。。。2

3

4

5

6

Σ

7

x1

x2

Σ φw1w2 y

入力信号

入力信号への重み(係数)

0を超えた場合に出力(発火)

b

閾値の役割(発火のしやすさ)を果たす 例)閾値を0.5にする場合、予め-0.5を 用意しておくことで0を超えにくくする

(bに設定した数値の分、発火しやすくする)

8

x1

x2

Σ φw1=0.5w2=0.5 y

b=-0.7

x1 x2 y1 1 11 0 00 1 00 0 0

9

x1

x2

Σ φw1=0.5w2=0.5 y

b=-0.2

x1 x2 y1 1 11 0 10 1 10 0 0

10

x1

x2

Σ φw1=-0.5w2=-0.5 y

b=0.7

x1 x2 y1 1 01 0 10 1 10 0 1

11

x1

x2

Σ φw1w2 y

b

12

x1

x2

Σ φw1w2

y

b

Σ φ

Σ φw3

b

w4

w5

w6b

13

x1

x2

Σ φw1=0.5

y

b=-0.7

Σ φ

Σ φ

b=-0.7w5=0.5

w6=0.5

x1 x2 y1 1 01 0 10 1 10 0 0

w2=-0.5w3=0.5w2=-0.5

OR

NAND

AND

b=0.714

y

良く見るグラフ

15

x1

x2

Σ φw1w2

y

b

Σ φ

Σ φw3

b

w4

w5

w6b

活性化関数

16

relu <- function(x) sapply(x, function(z) max(0,z))ggplot(data=data.frame(x=c(-6,6))) + stat_function(fun=step) + xlim(-6,6)

step<-function(x){ifelse(x>0,1,0)}ggplot(data=data.frame(x=c(-6,6))) + stat_function(fun=step) + xlim(-6,6)

図を作るのに使ったRのコードを サンプルで掲載

sigmoid <- function(t){ 1/(1+exp(-t)) }ggplot(data=data.frame(x=c(-6,6))) + stat_function(fun=step) + xlim(-6,6)

17

18

x1

x2

Σ φw1w2

y

b

Σ φ

Σ φw3

b

w4

w5

w6b

19

20

21

時間がないのでここから

22

23

http://www.slideshare.net/yasuyukisugai/io-t-deeplearning

学習モデルを作成するためにGPUインスタンスをスポットで

一時的に利用

画像が蓄積されてきたらまたスポットを立ち上げて 学習のサイクルを回す

24

25

https://github.com/microsoft/caffe

http://caffe.berkeleyvision.org/install_apt.html

http://caffe.berkeleyvision.org/install_osx.html

https://github.com/sh1r0/caffe-android-lib

https://github.com/BVLC/caffe/tree/opencl

26

27

https://github.com/BVLC/caffe/pulse/monthly

少し落ち着いてきたかな?

28

29

GoogLeNet: ILSVRC14 winner

https://github.com/BVLC/caffe/wiki/Model-Zoo

”Caffe offers themodel definitionsoptimization settingspre-trained weights

so you can start right away.”

30

31

http://caffe.berkeleyvision.org/

https://github.com/BVLC/caffe/

32

いろんなところに点在しちゃってる・・・

所々更新されないのは ご愛嬌。。。

https://docs.google.com/presentation/d/1UeKXVgRvvxg9OUdh_UiC5G71UMscNPlvArsWER41PsU/edit#slide=id.p

個人的にはこれが一番 纏まっててわかりやすいかと

33

http://demo.caffe.berkeleyvision.org/

34

http://places.csail.mit.edu/

35

36

時間が限られているので、主にConvolution層とPooling層だけ説明します

37

38

0.1

0.2

0.7

Convolution ReLU Pooling

::

::

::

::

::

::

::

::

::

Convolution ReLU Pooling Full-Connected softmax

-1 -1 -1 -1 -1 -1-1 1 -1 -1 -1 -1-1 1 -1 -1 -1 -1-1 1 1 1 -1 -1-1 -1 -1 -1 -1 -1-1 -1 -1 -1 -1 -1

-1 -1 -1

-1 1 -1

-1 1 -1

-1 -1 1

-1 1 -1

-1 -1 -1

-1 -1 1

-1 1 -1

1 -1 1

1 0.1 0.45 0.45

0.45 -0.33 0.45 0.33

0.33 0.1 0.45 0.33

0.1 -0.1 0.1 0.33

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

フィルタを1つずつ スライドして スコア算出

左上は全て一致しているため、1となる

省略省略

39

白いところが負数から 0に変化

1 0.1 0.45 0.45

0.45 -0.33 0.45 0.33

0.33 0.1 0.45 0.33

0.1 -0.1 0.1 0.33

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

1 0.1 0.45 0.45

0.45 0 0.45 0.33

0.33 0.1 0.45 0.33

0.1 0 0.1 0.33

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

40

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

x x x x

:

4x4を2x2に分割 分割した領域ごとに 最大値を算出し、

情報圧縮

省略省略

1 0.45

0.33 0.45

x x

x x

x x

x x

:

1 0.1 0.45 0.45

0.45 0 0.45 0.33

0.33 0.1 0.45 0.33

0.1 0 0.1 0.33

41

42

43

44

••

••

••

••

••

今日は細かい話は割愛します

45

46

https://docs.google.com/presentation/d/1UeKXVgRvvxg9OUdh_UiC5G71UMscNPlvArsWER41PsU/edit#slide=id.g129385c8da_651_127

47

https://docs.google.com/presentation/d/1UeKXVgRvvxg9OUdh_UiC5G71UMscNPlvArsWER41PsU/edit#slide=id.g129385c8da_651_138

48

https://docs.google.com/presentation/d/1UeKXVgRvvxg9OUdh_UiC5G71UMscNPlvArsWER41PsU/edit#slide=id.g129385c8da_651_150

49

https://docs.google.com/presentation/d/1UeKXVgRvvxg9OUdh_UiC5G71UMscNPlvArsWER41PsU/edit#slide=id.g129385c8da_651_158

50

51

•••

•••

••

52

•••

53

https://docs.google.com/presentation/d/1UeKXVgRvvxg9OUdh_UiC5G71UMscNPlvArsWER41PsU/edit#slide=id.g129385c8da_651_0

54

•••••

55

http://host.robots.ox.ac.uk/pascal/VOC/voc2012/

https://docs.google.com/presentation/d/1UeKXVgRvvxg9OUdh_UiC5G71UMscNPlvArsWER41PsU/edit#slide=id.g129385c8da_651_10

56

57

••

••

58

https://github.com/BVLC/caffe/pull/3948

59

••••

••

••

60

http://tutorial.caffe.berkeleyvision.org/caffe-cvpr15-sequences.pdf

61

http://tutorial.caffe.berkeleyvision.org/caffe-cvpr15-sequences.pdf

62

http://tutorial.caffe.berkeleyvision.org/caffe-cvpr15-sequences.pdf

63

http://tutorial.caffe.berkeleyvision.org/caffe-cvpr15-sequences.pdf

64

••

http://youtu.be/w2iV8gt5cd4

http://youtu.be/9VH8bn7ikbw

http://jeffdonahue.com/lrcn/

65

http://mscoco.org/

••

66

やはりデータの入手がいつまでも課題に。。。

https://github.com/BVLC/caffe/pull/2033

本家に取り込まれるのに 時間がかかっただけで、

実装自体は前からあります。。。

そこまで新しい話ではないけど、 RNNがまた盛り上がってきてるし CNNとRNNを組み合わせるのは

大きな可能性を秘めているので、 取り上げてみました

67

おわり。

68

top related