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
(メタ)科学コミュニケーターからみたAI for Scienceの同床異夢
rmaruy
0
250
機械学習 - SVM
trycycle
PRO
2
1.1k
Cross-Media Technologies, Information Science and Human-Information Interaction
signer
PRO
3
32k
大黒市で発生した大規模インシデント の ポストモーテムから読み解く、 記憶媒体消去の大切さ
shucho0103
0
190
水耕栽培を始める前に知っておきたい植物の科学
grow_design_lab
0
250
AkarengaLT vol.41
hashimoto_kei
1
140
俺たちは本当に分かり合えるのか? ~ PdMとスクラムチームの “ずれ” を科学する
bonotake
2
2.4k
SpatialRDDパッケージによる空間回帰不連続デザイン
saltcooky12
0
250
データベース08: 実体関連モデルとは?
trycycle
PRO
0
1.2k
AkarengaLT vol.40
hashimoto_kei
0
110
イロレーティングを活用した関東大学サッカーの定量的実力評価 / A quantitative performance evaluation of Kanto University Football Association using Elo rating
konakalab
0
280
20251212_LT忘年会_データサイエンス枠_新川.pdf
shinpsan
0
290
Featured
See All Featured
Unsuck your backbone
ammeep
672
58k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Producing Creativity
orderedlist
PRO
348
40k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Mind Mapping
helmedeiros
PRO
1
250
Building the Perfect Custom Keyboard
takai
2
800
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
66
55k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
The Cult of Friendly URLs
andyhume
79
6.9k
How to build a perfect <img>
jonoalderson
1
5.7k
How to make the Groovebox
asonas
2
2.2k
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 勾配法と同様のプロセスで、更新量が漸減していく。