SlideShare uma empresa Scribd logo
1 de 32
岡谷貴之「深層学習」(講談社)
を勝手に解説
株式会社ウェブファーマー
大政孝充
内容
4.4.2 順伝播と逆伝播の行列計算(後半)
3.6.5 モーメンタム
4.4.3 勾配の差分近似計算
を解説
4.4.2 順伝播と逆伝播の行列計算(後半)
目標:それぞれの行列計算式がこれまでの成分
計算に対応することを示す
まず(4.15)式が(4.12)式に対応することを示す
の各成分が
となればいい
まず、それぞれの行列を確認
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
l+1層のΔは
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
Wの転置行列は
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
djn
(l)
= f ' ujn
(l)
( ) wkj
(l+1)
dkn
(l+1)
k
å
djn
(l)
= djn
(l+1)
wkj
(l+1)
f ' ujn
(l)
( )( )k
å
f ’ はkに無関係なので
Σの中に入れる
一致
ここに注目
次に
の各成分が
¶W(l)
=
1
N
D(l)
Z(l-1)T
¶b(l)
=
1
N
D(l)
1N
T
ì
í
ï
ï
î
ï
ï
となることを示す
¶W(l)
=
1
N
D(l)
Z(l-1)T
¶b(l)
=
1
N
D(l)
1N
T
ì
í
ï
ï
î
ï
ï
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
¶W(l)
=
1
N
D(l)
Z(l-1)T
¶b(l)
=
1
N
D(l)
1N
T
ì
í
ï
ï
î
ï
ï
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
一致
¶W(l)
=
1
N
D(l)
Z(l-1)T
¶b(l)
=
1
N
D(l)
1N
T
ì
í
ï
ï
î
ï
ï
(l+1)
1
(l)(l-1)
1 1
i
j k
:: :
: : :
KJI
:
: :
:
一致
最後に求めた勾配からWとbを更新する
この更新量で
DW(l)
= -e¶W(l)
Db(l)
= -e¶b(l)
ì
í
ï
îï
と更新
W(l)
¬W(l)
+DW(l)
b(l)
¬ b(l)
+Db(l)
ì
í
ï
îï
3.6.5 モメンタム
モメンタム(勢い)・・・重みの修正量がこれまでの勢
いに引っ張られる
モメンタムが無い場合・・・・
このような w – Eの関係の場合、
更新の度に谷底を挟んで行き来
し、収束しない
t−1 の更新量 −0.5
t の更新量 +0.5
E
w
モメンタムを使う
そこで前回の更新料を反映させ
れば、谷底に落ちるだろう
t−1 の更新量 −0.5
t の更新量
+0.5+μ・(−0.5)
E
w
前回の更新量
モメンタムの式
Dw(l,t)
= m·Dw(l,t-1)
-eÑEt
今回の更新量
Dw(l,t)
= -eÑEt
モメンタム無し:
今回誤差逆伝播によ
り求めた値
モメンタム有り:
前回の更新量
掛け率(0.5〜0.9)
モメンタムの式を行列で書くと
Dw(l,t)
= m·Dw(l,t-1)
-eÑEt
成分表示:
DW(l,t)
= mDW(l,t-1)
-e¶W(l,t)
Db(l,t)
= mDb(l,t-1)
-e¶b(l,t)
ì
í
ï
îï
行列表示:
さらに重み減衰を加えると
DW(l,t)
= mDW(l,t-1)
-e ¶W(l,t)
+ lW(l,t)
( )
Db(l,t)
= mDb(l,t-1)
-e¶b(l,t)
ì
í
ï
îï
DW(l,t)
= mDW(l,t-1)
-e¶W(l,t)
Db(l,t)
= mDb(l,t-1)
-e¶b(l,t)
ì
í
ï
îï
重み減衰な部分
4.4.3 勾配の差分近似計算
勾配の計算は複雑だけど、プログラム
は合ってるかな?
近似計算で確かめる
差分近似計算とは・・・
εがそこそこ小さいと、大
体成り立つだろう
微分の
定義:
そのまま順伝播させて計
算できる
wにεを加えた後、順伝播
させて計算できる
すぐ計算できる
近似に向いてる
εをどの値にするか・・・・
この差が小さくないと近似にならない
εを小さくすると打ち切り誤差は小さくなる
が、丸め誤差が増大する
¶E
¶w
打ち切り誤差・・・面倒なので1変数にして考える
E w+e( ) をテイラー展開して
理論式と近似式との差は
打ち切り誤差
丸め誤差・・・
計算機イプシロンを として
E w+e( )- E w( )
e
- E' w( )
丸め誤差は
ここもE(w)・ くらい
ec
ec
ここでE(w)・ くらいec
2E w( )ec
e
打ち切り誤差と丸め誤差からトータル誤差の最
小値を求める
誤差
ε
丸め誤差
打ち切り誤差
トータル誤差
eT =
1
2
E'' w( )e +
2E w( )ec
e
® min
丸め誤差打ち切り誤差トータル誤差
deT
de
=
d
de
1
2
E'' w( )e +
2E w( )ec
e
æ
è
ç
ö
ø
÷= 0 とすると、
1
2
E'' w( )-
2E w( )ec
e2
= 0
e = 2 ec E w( ) E'' w( ) e = 2 ec w
???
(p53の式)

Mais conteúdo relacionado

Mais de WEBFARMER. ltd.

論文読み会 発表資料 SPMモデル
論文読み会 発表資料 SPMモデル論文読み会 発表資料 SPMモデル
論文読み会 発表資料 SPMモデルWEBFARMER. ltd.
 
The 53th Computer Vision Study@ kantou by Takamitsu Omasa
The 53th Computer Vision Study@ kantou by Takamitsu OmasaThe 53th Computer Vision Study@ kantou by Takamitsu Omasa
The 53th Computer Vision Study@ kantou by Takamitsu OmasaWEBFARMER. ltd.
 
SPIGAN理論と実装について at 論文LT会 in LPIXEL
SPIGAN理論と実装について at 論文LT会 in LPIXELSPIGAN理論と実装について at 論文LT会 in LPIXEL
SPIGAN理論と実装について at 論文LT会 in LPIXELWEBFARMER. ltd.
 
Nips2018 study only_pu_net_pdf
Nips2018 study only_pu_net_pdfNips2018 study only_pu_net_pdf
Nips2018 study only_pu_net_pdfWEBFARMER. ltd.
 
第46回コンピュータ・ビジョン勉強会@関東(前編)
第46回コンピュータ・ビジョン勉強会@関東(前編)第46回コンピュータ・ビジョン勉強会@関東(前編)
第46回コンピュータ・ビジョン勉強会@関東(前編)WEBFARMER. ltd.
 
Chainer Meetup 発表資料
Chainer Meetup 発表資料Chainer Meetup 発表資料
Chainer Meetup 発表資料WEBFARMER. ltd.
 
Study Group of NIPS2017 presented by webfarmer.ltd
Study Group of NIPS2017 presented by webfarmer.ltdStudy Group of NIPS2017 presented by webfarmer.ltd
Study Group of NIPS2017 presented by webfarmer.ltdWEBFARMER. ltd.
 
Machine Learning 15minutes 発表資料(株)ウェブファーマー
Machine Learning 15minutes 発表資料(株)ウェブファーマーMachine Learning 15minutes 発表資料(株)ウェブファーマー
Machine Learning 15minutes 発表資料(株)ウェブファーマーWEBFARMER. ltd.
 
Connect_GANs_Actor-Critic
Connect_GANs_Actor-CriticConnect_GANs_Actor-Critic
Connect_GANs_Actor-CriticWEBFARMER. ltd.
 
Ml15min発表資料(提出用)
Ml15min発表資料(提出用)Ml15min発表資料(提出用)
Ml15min発表資料(提出用)WEBFARMER. ltd.
 
Introduction to GAN model
Introduction to GAN modelIntroduction to GAN model
Introduction to GAN modelWEBFARMER. ltd.
 
Introduction to A3C model
Introduction to A3C modelIntroduction to A3C model
Introduction to A3C modelWEBFARMER. ltd.
 
Introduction to Neural Turning Machine
Introduction to Neural Turning MachineIntroduction to Neural Turning Machine
Introduction to Neural Turning MachineWEBFARMER. ltd.
 
人工知能ハッカソン用プレゼン資料(161217)
人工知能ハッカソン用プレゼン資料(161217)人工知能ハッカソン用プレゼン資料(161217)
人工知能ハッカソン用プレゼン資料(161217)WEBFARMER. ltd.
 
Hackathon 161010 pressen
Hackathon 161010 pressenHackathon 161010 pressen
Hackathon 161010 pressenWEBFARMER. ltd.
 
Introduction to Prioritized Experience Replay
Introduction to Prioritized Experience ReplayIntroduction to Prioritized Experience Replay
Introduction to Prioritized Experience ReplayWEBFARMER. ltd.
 
The introduction to FRMQN model
The introduction to FRMQN modelThe introduction to FRMQN model
The introduction to FRMQN modelWEBFARMER. ltd.
 

Mais de WEBFARMER. ltd. (20)

論文読み会 発表資料 SPMモデル
論文読み会 発表資料 SPMモデル論文読み会 発表資料 SPMモデル
論文読み会 発表資料 SPMモデル
 
The 53th Computer Vision Study@ kantou by Takamitsu Omasa
The 53th Computer Vision Study@ kantou by Takamitsu OmasaThe 53th Computer Vision Study@ kantou by Takamitsu Omasa
The 53th Computer Vision Study@ kantou by Takamitsu Omasa
 
SPIGAN理論と実装について at 論文LT会 in LPIXEL
SPIGAN理論と実装について at 論文LT会 in LPIXELSPIGAN理論と実装について at 論文LT会 in LPIXEL
SPIGAN理論と実装について at 論文LT会 in LPIXEL
 
Nips2018 study only_pu_net_pdf
Nips2018 study only_pu_net_pdfNips2018 study only_pu_net_pdf
Nips2018 study only_pu_net_pdf
 
第46回コンピュータ・ビジョン勉強会@関東(前編)
第46回コンピュータ・ビジョン勉強会@関東(前編)第46回コンピュータ・ビジョン勉強会@関東(前編)
第46回コンピュータ・ビジョン勉強会@関東(前編)
 
Chainer Meetup 発表資料
Chainer Meetup 発表資料Chainer Meetup 発表資料
Chainer Meetup 発表資料
 
SLAM_study_document
SLAM_study_documentSLAM_study_document
SLAM_study_document
 
Study Group of NIPS2017 presented by webfarmer.ltd
Study Group of NIPS2017 presented by webfarmer.ltdStudy Group of NIPS2017 presented by webfarmer.ltd
Study Group of NIPS2017 presented by webfarmer.ltd
 
Nips20180127
Nips20180127Nips20180127
Nips20180127
 
Machine Learning 15minutes 発表資料(株)ウェブファーマー
Machine Learning 15minutes 発表資料(株)ウェブファーマーMachine Learning 15minutes 発表資料(株)ウェブファーマー
Machine Learning 15minutes 発表資料(株)ウェブファーマー
 
DRL_stydy_1_doc_ohmasa
DRL_stydy_1_doc_ohmasaDRL_stydy_1_doc_ohmasa
DRL_stydy_1_doc_ohmasa
 
Connect_GANs_Actor-Critic
Connect_GANs_Actor-CriticConnect_GANs_Actor-Critic
Connect_GANs_Actor-Critic
 
Ml15min発表資料(提出用)
Ml15min発表資料(提出用)Ml15min発表資料(提出用)
Ml15min発表資料(提出用)
 
Introduction to GAN model
Introduction to GAN modelIntroduction to GAN model
Introduction to GAN model
 
Introduction to A3C model
Introduction to A3C modelIntroduction to A3C model
Introduction to A3C model
 
Introduction to Neural Turning Machine
Introduction to Neural Turning MachineIntroduction to Neural Turning Machine
Introduction to Neural Turning Machine
 
人工知能ハッカソン用プレゼン資料(161217)
人工知能ハッカソン用プレゼン資料(161217)人工知能ハッカソン用プレゼン資料(161217)
人工知能ハッカソン用プレゼン資料(161217)
 
Hackathon 161010 pressen
Hackathon 161010 pressenHackathon 161010 pressen
Hackathon 161010 pressen
 
Introduction to Prioritized Experience Replay
Introduction to Prioritized Experience ReplayIntroduction to Prioritized Experience Replay
Introduction to Prioritized Experience Replay
 
The introduction to FRMQN model
The introduction to FRMQN modelThe introduction to FRMQN model
The introduction to FRMQN model
 

Último

論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Gamesatsushi061452
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。iPride Co., Ltd.
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...Toru Tamaki
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsWSO2
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video UnderstandingToru Tamaki
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。iPride Co., Ltd.
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptxsn679259
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイスCRI Japan, Inc.
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルCRI Japan, Inc.
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。iPride Co., Ltd.
 

Último (10)

論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native Integrations
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 

岡谷貴之「深層学習」の解説