Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ゼロから作るDeepLearning 第5章 誤差逆伝播法による重み更新を追ってみる
Search
dproject21
February 20, 2017
Science
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ゼロから作るDeepLearning 第5章 誤差逆伝播法による重み更新を追ってみる
dproject21
February 20, 2017
More Decks by dproject21
See All by dproject21
ISTQB/JSTQBシラバスから学ぶAgileTesting / A guide of agile testing based on ISTQB syllabus
dproject21
4
4k
JSTQB Advanced Level 模擬問題作成方法 / methodology to questions creation for JSTQB advanced level
dproject21
3
1.5k
試験に絶対出ないJSTQB AL TA,TM問題 / Questions that will never be given on the exam of JSTQB advanced level
dproject21
0
1.6k
The official zip code book is terrible. And what should I do with the address you wrote.
dproject21
0
230
TDD applied Data Cleansing
dproject21
0
2k
Data preprocessing for MachineLearning/BI by Golang and MySQL UDF
dproject21
1
1k
高精度名寄せシステムを支える テキスト処理 (の、ほんのさわり)
dproject21
3
2.7k
ゼロから作るDeepLearning 第7章前半ざっくりまとめ
dproject21
0
1k
ゼロから作るDeepLearning 第6章ざっくりまとめ
dproject21
2
1.5k
Other Decks in Science
See All in Science
機械学習 - DBSCAN
trycycle
PRO
0
1.9k
MATSUO Makiko
genomethica
0
170
SHINOMIYA Nariyoshi
genomethica
0
160
不動産業界における業界特化のデータ整備とAI活用 ─Vertical DataとVertical AI─
estie
1
780
AI bij literatuuronderzoek in de wetenschap
voginip
0
210
コーヒー豆様核 (Coffee-bean nuclei) における形態学的サブタイピングと精選・焙煎特性の同定
jagupath
PRO
0
120
データベース08: 実体関連モデルとは?
trycycle
PRO
0
1.3k
機械学習 - 授業概要
trycycle
PRO
0
560
知能とはなにか -ヒトとAIのあいだ-
tagtag
PRO
1
120
Wet Active Matter
rajeshrinet
0
120
Van Dare naar Durf
voginip
0
260
Build your own LLM, Live, with MicroGPT
ianozsvald
0
110
Featured
See All Featured
Practical Orchestrator
shlominoach
191
11k
Thoughts on Productivity
jonyablonski
76
5.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Writing Fast Ruby
sferik
630
63k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
600
Building AI with AI
inesmontani
PRO
1
1.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Leo the Paperboy
mayatellez
8
1.9k
Transcript
「ゼロから作るDeepLearning」 第5章 誤差逆伝播法の流れをまとめてみる 2017.2.20 たのっち @dproject21
前回質問を頂いた内容を改めて確認しま した。 • 「ゼロから作るDeepLearning」斎藤 康毅 著 オライリー・ジャパンより2016年9⽉ 発⾏ https://www.oreilly.co.jp/books/9784873117584/ •
公式サポートページ https://github.com/oreilly-japan/deep-learning-from-scratch • 第5章「誤差逆伝播法」の重み更新部分です。 https://deeplearning-yokohama.connpass.com/
勾配の計算について " # " # 1 ℎ( ) 勾配 :
すべての変数の偏微分をベクト ルでまとめたもの。 ニューラルネットワークでは、損失関 数の値ができるかぎり⼩さくなるベク トルを、勾配降下法を⽤いて求め、重 み付けを更新する。 . = . − . 学習率 の値は0.01など事前に決めて おく。この学習率の値を変更しながら、 正しく学習できているか確認していく。
勾配の計算について 4.4.1 勾配法で出てくる例を解いてみる。 問: 4 , " = 4 #
+ " # の最⼩値を勾配法で求める。( = 0.1 とする) 1回⽬ : 4 = −3.0, " = 4.0に対して、4 # = −6.0, " # = 8 となる。 4 # = −0.6, " # = 0.8となるので、4 = −2.4, " = 3.2に更新する。 2回⽬ : 4 = −2.4, " = 3.2に対して、 4 # = −4.8, " # = 6.4 となる。 4 # = −0.48, " # = 0.64となるので、4 = −1.92, " = 2.56に更新する。 以降、計算を続けていくと、0に集約されていく。
勾配の計算について では、ニューラルネットワークに対する勾配は? 重みは、最初ランダムな値(正規分布からランダムな値)が⽤いられ、 ← − で更新される。 では、 DE DF の値は、どうやって計算されるか。
損失関数を交差エントロピー誤差 = − ∑ . . log . として求めていく。
勾配の計算について 交差エントロピー誤差 = − ∑ . . log . の偏微分は…
の微分 = 1 O . . log . の微分 = −1 . log . の微分 = それぞれ − 1 log . の微分 = −. . の微分 = − PQ RQ ( = log , DR DS = " S より) (以降、詳細な計算は省略。テキストを参照。)
勾配の計算について 同様に、Softmax関数の偏微分を求めると、 . − . となる。
勾配の計算について シグモイド関数の偏微分は、 (1 − ) ReLU関数の偏微分は、 = T 1 (
> 0) 0 ( ≦ 0) となる。
勾配の計算について Affineレイヤの逆伝播は、ReLUレイヤの各ニューロンからの逆伝播の値を受けて、 DE DW が⼊⼒となる。 Affineレイヤの出⼒Y = + に対して、 バイアスの逆伝播はDE
DW 、⼊⼒データと重みの乗算に対する逆伝播はDE DW ⼊⼒データの逆伝播はDE D[ = DE DW \ ] 重みの逆伝播は DE DF = ] \ DE DW
勾配の計算について 重みの更新は、 それぞれの値に対して⾏うので、 DE DF に学習係数を適⽤し、 ← − ← ""
#" _" "# ## _# − "" #" _" "# ## _# となる。次の学習では、ごくわずかな更新をした重みを⽤いて、 = + に 対する⼊⼒データとの誤差を求める。 4.4.1 勾配法と同様のプロセスで、更新量が漸減していく。