SlideShare a Scribd company logo
1 of 10
Download to read offline
深層学習 day2 レポート
【各項目の要点】
Section1 勾配消失問題
勾配消失問題とは、ニューラルネットワークにおいて中間層を増やすことで起こる問題
であり、誤差逆伝播が下位層に進んでいくにつれて、勾配が緩やかになっていく。このため
最適解の導出に時間がかかる。この問題の解決法として、以下の3つがある。
1.活性化関数の選択
ReLU 関数は重みが 1 で伝わるか伝わらない(0 で伝わる)かのいずれかであるため、
勾配の消失を防ぎ、スパース化(値のほとんどが 0 になること)にも貢献する。同様の
働きをする活性化関数には、Leaky ReLU、softmax、tanh などがある。
2.重みの初期値設定
重みを標準正規分布に基づいて乱数で設定するという方法があり、
この方法では、
各レ
イヤー(層)の重みは、0 あるいは 1 に偏る。標準正規分布の値を 0.01 などの小さな
値で除すると 0.5 あたりに偏る(ピークを持つ分布となる)
。
3.バッチ正規化
ミニバッチ単位で入力値のデータの偏りを抑制する方法がある。活性化関数に値を渡
す前後にバッチ正規化の処理を行った層を加えることで問題を抑制できる。
Section2 学習率最適化手法
学習率の最適化のためのハイパーパラメータには、
いくつかあるが、
局所的最適解に陥ら
ずに大域的最適解に至るものは、
「Momentum」あるいは「Adam」である。
誤差関数の値をより小さくする方向に重み及びバイアスを更新し、次のエポックに反映
させる。確率勾配降下法を用いると、ランダムに一部のデータで学習させ、局所最小解に収
まらずに効率よく最適解が見つかる。
Section3 過学習
過学習とは、
データに適合しすぎてしまい、
新たな未知のデータに適合しなくなるという
問題である。
学習させるデータの重みが大きいと過学習が起こることがあり、
誤差に対して、
正則化項を加算することで重みを抑制することができる。誤差関数(En(w)は以下のように
あらわされ、p=1 のとき L1 正則化(ラッソ回帰)
、p=2 のとき L2 正則化(リッジ回帰)と
なる。
)
𝐸𝑛(𝑤) =
1
𝑝
𝜆‖𝑥‖𝑝
‖𝑥‖𝑝 = (|𝑥1|𝑝
+ ⋯ |𝑥𝑛|𝑝)
1
𝑝
Section4 畳み込みニューラルネットワークの概念
畳み込みニューラルネットワークでは、
「入力層」と「出力層」の間に、
「中間層」として
「畳み込み層」
、
「プーリング層」
、
「全結合層」が使われる。
畳み込み層というのは、画像の場合、縦、横、チャンネルの3次元データをそのまま学習
し次に伝えることができる。この時、
(入力画像*フィルター+バイアス)が出力画像とな
る。
また、プーリング層とは、畳み込み演算と組み合わせて使うもので重みは使わず、最大値
を返す max-pooling、平均値を返す avarage-pooling がある。
全結合層は、画像の場合は、縦、横、チャンネルの3次元データが1次元のデータとして
処理される。
Section5 最新の CNN
CNN は日々開発されており、最新の CNN が登場しても一時すると他の技術にとってか
わられるのが通常である。講義で紹介された AlexNet という技術は 2012 年に Hinton 教
授らのチームによって発表された物体認識のためのモデル(アーキテクチャ)である。物体
認識のために初めて深層学習の概念及び畳み込みニューラルネットワークの概念を取り入
れたアーキテクチャであるが、
翌年には他のアーキテクチャにとってかわられ、
現在ではほ
とんど用いられていない。
参考までに、同じく講義で紹介のあった ImageNet は、1,400 万枚以上もある大規模なカ
ラー写真の教師用ラベル付き画像データベースである。
(なお、WordNet は、英語の語彙の
データベースである。
)
2021 年現在、新しいと思われる応用技術として、R-CNN(R-CNN, Fast R-CNN, Faster
R-CNN, Mask R-CNN)がある。この技術は、自身の復習を兼ねて最新の物体検出を行う
Region CNN(領域ベース CNN)である。この技術は画像内に複数の物体が映っている場
合に、
すべての映り込んでいる物体の座標を当てる必要がある。
物体検出モデルでは大きく
次のタスクがある。
1.ある画像領域は、背景か物体か?(物体検出タスク)
2.もし1が物体ならば何の物体か?(画像認識タスク)
そのため単純に画像認識だけを行うモデルに比べて難易度が高い。
参考 URL: 最新の Region CNN(R-CNN)を用いた物体検出入門 ~物体検出とは? R-CNN,
Fast R-CNN, Faster R-CNN, Mask R-CNN~(2021. 2. 16)
https://qiita.com/arutema47/items/8ff629a1516f7fd485f9
【実装演習のキャプチャー、サマリーと考察】
実際のディープラーニングの訓練とテストを実装したコードを示す。
ここで
「iters_num」
はエポック数を表しており、今回は 1,000 回繰り返していることがわかる。
入力層のノード数は 784、隠れ層のノード数は 40、出力層のノード数は 10 としており、
バッチサイズは 100、学習率は 0.1 としている。
次に訓練(トレーニング)とテストの結果を示す。はじめのうちは、訓練、テストとも
に正答率は低く 2 割程度であるが、回数を重ねるにつれ精度は上がっていき、200 回に近
づくと正答率は 8 割以上になる。そして、900 回を超えると、正答率は 9 割を超える。
また今回の訓練とテストでは、正答率(accuracy)に差がないため、過学習を起こして
ないと考えられる。
【深層学習 day2 に関する自身の考察】
※以下の考察では、
「ゼロから作る Deep Learning -Python で学ぶディープラーニングの理論と実装-、オ
ライリー・ジャパン」を参考にしています。
ニューラルネットワークの学習の目的は、損失関数の値をできるだけ小さくする最適な
パラメータを見つけることであり、このような問題を解くことを最適化という。
最適なパラメータを見つけるために、
パラメータの勾配を手掛かりとして、
勾配の方向に
パラメータを更新するというステップを何度も繰り返して、徐々に最適なパラメータに近
づけていくという方法(勾配降下法)が用いられる。
ニューラルネットワークの最適化において特に重要となるのが重みの初期値である。初
期値によって、学習の結果が大きく変わりうるからである。Excel のソルバーを用いた最適
化にも言えることであるが、初期値は、正解になるべく近い値に設定するのが望ましい。た
だし、正解が何であるかは、はじめはわからないため、転移学習を用いてあらかじめ正解に
近づけたモデルを学習の開始時から用いたり、何度も繰り返しニューラルネットワークの
計算処理を行い、
認識精度の結果を確認し、
最も性能が高くなるときのパラメータをもとに
範囲を狭めていくことが有効であると考えられる。
また、自力で最適化を行うためには、ハイパーパラメータ(各層のニューロンの数、バッ
チサイズ、重み、最適化の方法など)は複数あるため、ある1つのパラメータのみに着目し
て変化させることを試み、
他のパラメータを固定した状態で、
1つずつパラメータを最適な
値に確定するのが望ましい方法であると考えられる。
また、
ハイパーパラメータの最適化では、
グリッドサーチなどの規則的な探索よりもラン
ダムサーチによるランダムな探索のほうがより良い結果になることが報告されている1。学
習のためのエポックを小さくして、1回の評価に要する時間を短縮するのも有効である。
機械学習の問題では、過学習が問題になることが多くある。過学習とは、訓練データに適
合しすぎてしまい、訓練データには含まれないほかのデータにはうまく対応できない状態
を言う。過学習が起きる原因には主に次のことが考えられる。
・パラメータをたくさん持ち、表現力の高いモデルである。
・訓練データが少ない。
過学習の抑制のために用いられる手法の一つに、
荷重減衰
(Weight Decay)
(L2 正則化)
がある。これは学習の過程において大きな重みをもつことに対してペナルティを課すこと
で、過学習を抑制しようとする。
もう一つの方法として、ドロップアウトがある。この方法では、訓練時に隠れ層のニュー
1 J. Bergstra and Y. Bengio, Random Search for Hyper-Parameter Optimization, J. Machine Learning
Research, 13, 281-305, 2012.
ロンをランダムに選び出し、消去しながら学習する方法である。
Batch Normalization は、2015 年に考案された手法であり、次の利点がある。
・学習を早く進行させることができる。
(学習係数を大きくすることができる。
)
・初期値にそれほど依存しない。
・過学習を抑制する。
(Dropout などの必要性を減らす。
)
データの正規化を行う Batch Normalization レイヤをニューラルネットワークに挿入す
るだけである。
畳み込みニューラルネットワーク(CNN)は、画像認識や音声認識で用いられる。
CNN のネットワーク構造は、
「Convolution レイヤ(畳み込み層)
」
、
「Pooling レイヤ(プ
ーリング層)
」を「Affine レイヤ(全結合層)
」で結ぶ構造となっている(図 1)
。
図 1 CNN のネットワーク構造
※出典:DeepAge、https://deepage.net/categories/deep_learning/
認識精度を高めるための方法はいくつかあり、アンサンブル学習、学習係数の減衰、デー
タ拡張などがある。データ拡張では、回転や移動による変形のほか、画像の中から一部を切
り出す「crop 処理」
、左右をひっくり返す「flip 処理」などがある。
層を深くすること(主に中間層の数を多くすること)の利点の一つは、ネットワークのパ
ラメータ数を少なくすることができる点である。
つまり、
より少ないパラメータで層を深く
しない場合と同じレベル
(あるいはそれ以上)
の表現力が達成できる。
その他の利点として、
より少ない学習データで、高速に学習を行うことができる。
ディープラーニングの高速化について、近年では、GPU を搭載したディープラーニング
専用の PC での実行や Google Colaboratory による実行
(無料で高機能な Nvidia 社の Tesra
K80 GPU を利用することができる。
)が有効である。
※出典:Analytics Board、https://su-gi-rx.com/archives/4670

More Related Content

Recently uploaded

VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一ffjhghh
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 

Recently uploaded (20)

VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一定制英国白金汉大学毕业证(UCB毕业证书)																			成绩单原版一比一
定制英国白金汉大学毕业证(UCB毕业证书) 成绩单原版一比一
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Deep learning 2

  • 1. 深層学習 day2 レポート 【各項目の要点】 Section1 勾配消失問題 勾配消失問題とは、ニューラルネットワークにおいて中間層を増やすことで起こる問題 であり、誤差逆伝播が下位層に進んでいくにつれて、勾配が緩やかになっていく。このため 最適解の導出に時間がかかる。この問題の解決法として、以下の3つがある。 1.活性化関数の選択 ReLU 関数は重みが 1 で伝わるか伝わらない(0 で伝わる)かのいずれかであるため、 勾配の消失を防ぎ、スパース化(値のほとんどが 0 になること)にも貢献する。同様の 働きをする活性化関数には、Leaky ReLU、softmax、tanh などがある。 2.重みの初期値設定 重みを標準正規分布に基づいて乱数で設定するという方法があり、 この方法では、 各レ イヤー(層)の重みは、0 あるいは 1 に偏る。標準正規分布の値を 0.01 などの小さな 値で除すると 0.5 あたりに偏る(ピークを持つ分布となる) 。 3.バッチ正規化 ミニバッチ単位で入力値のデータの偏りを抑制する方法がある。活性化関数に値を渡 す前後にバッチ正規化の処理を行った層を加えることで問題を抑制できる。 Section2 学習率最適化手法 学習率の最適化のためのハイパーパラメータには、 いくつかあるが、 局所的最適解に陥ら ずに大域的最適解に至るものは、 「Momentum」あるいは「Adam」である。 誤差関数の値をより小さくする方向に重み及びバイアスを更新し、次のエポックに反映 させる。確率勾配降下法を用いると、ランダムに一部のデータで学習させ、局所最小解に収 まらずに効率よく最適解が見つかる。 Section3 過学習 過学習とは、 データに適合しすぎてしまい、 新たな未知のデータに適合しなくなるという 問題である。 学習させるデータの重みが大きいと過学習が起こることがあり、 誤差に対して、 正則化項を加算することで重みを抑制することができる。誤差関数(En(w)は以下のように あらわされ、p=1 のとき L1 正則化(ラッソ回帰) 、p=2 のとき L2 正則化(リッジ回帰)と なる。 ) 𝐸𝑛(𝑤) = 1 𝑝 𝜆‖𝑥‖𝑝
  • 2. ‖𝑥‖𝑝 = (|𝑥1|𝑝 + ⋯ |𝑥𝑛|𝑝) 1 𝑝 Section4 畳み込みニューラルネットワークの概念 畳み込みニューラルネットワークでは、 「入力層」と「出力層」の間に、 「中間層」として 「畳み込み層」 、 「プーリング層」 、 「全結合層」が使われる。 畳み込み層というのは、画像の場合、縦、横、チャンネルの3次元データをそのまま学習 し次に伝えることができる。この時、 (入力画像*フィルター+バイアス)が出力画像とな る。 また、プーリング層とは、畳み込み演算と組み合わせて使うもので重みは使わず、最大値 を返す max-pooling、平均値を返す avarage-pooling がある。 全結合層は、画像の場合は、縦、横、チャンネルの3次元データが1次元のデータとして 処理される。 Section5 最新の CNN CNN は日々開発されており、最新の CNN が登場しても一時すると他の技術にとってか わられるのが通常である。講義で紹介された AlexNet という技術は 2012 年に Hinton 教 授らのチームによって発表された物体認識のためのモデル(アーキテクチャ)である。物体 認識のために初めて深層学習の概念及び畳み込みニューラルネットワークの概念を取り入 れたアーキテクチャであるが、 翌年には他のアーキテクチャにとってかわられ、 現在ではほ とんど用いられていない。 参考までに、同じく講義で紹介のあった ImageNet は、1,400 万枚以上もある大規模なカ ラー写真の教師用ラベル付き画像データベースである。 (なお、WordNet は、英語の語彙の データベースである。 ) 2021 年現在、新しいと思われる応用技術として、R-CNN(R-CNN, Fast R-CNN, Faster R-CNN, Mask R-CNN)がある。この技術は、自身の復習を兼ねて最新の物体検出を行う Region CNN(領域ベース CNN)である。この技術は画像内に複数の物体が映っている場 合に、 すべての映り込んでいる物体の座標を当てる必要がある。 物体検出モデルでは大きく 次のタスクがある。 1.ある画像領域は、背景か物体か?(物体検出タスク) 2.もし1が物体ならば何の物体か?(画像認識タスク) そのため単純に画像認識だけを行うモデルに比べて難易度が高い。 参考 URL: 最新の Region CNN(R-CNN)を用いた物体検出入門 ~物体検出とは? R-CNN, Fast R-CNN, Faster R-CNN, Mask R-CNN~(2021. 2. 16) https://qiita.com/arutema47/items/8ff629a1516f7fd485f9
  • 4.
  • 5.
  • 6.
  • 9. 【深層学習 day2 に関する自身の考察】 ※以下の考察では、 「ゼロから作る Deep Learning -Python で学ぶディープラーニングの理論と実装-、オ ライリー・ジャパン」を参考にしています。 ニューラルネットワークの学習の目的は、損失関数の値をできるだけ小さくする最適な パラメータを見つけることであり、このような問題を解くことを最適化という。 最適なパラメータを見つけるために、 パラメータの勾配を手掛かりとして、 勾配の方向に パラメータを更新するというステップを何度も繰り返して、徐々に最適なパラメータに近 づけていくという方法(勾配降下法)が用いられる。 ニューラルネットワークの最適化において特に重要となるのが重みの初期値である。初 期値によって、学習の結果が大きく変わりうるからである。Excel のソルバーを用いた最適 化にも言えることであるが、初期値は、正解になるべく近い値に設定するのが望ましい。た だし、正解が何であるかは、はじめはわからないため、転移学習を用いてあらかじめ正解に 近づけたモデルを学習の開始時から用いたり、何度も繰り返しニューラルネットワークの 計算処理を行い、 認識精度の結果を確認し、 最も性能が高くなるときのパラメータをもとに 範囲を狭めていくことが有効であると考えられる。 また、自力で最適化を行うためには、ハイパーパラメータ(各層のニューロンの数、バッ チサイズ、重み、最適化の方法など)は複数あるため、ある1つのパラメータのみに着目し て変化させることを試み、 他のパラメータを固定した状態で、 1つずつパラメータを最適な 値に確定するのが望ましい方法であると考えられる。 また、 ハイパーパラメータの最適化では、 グリッドサーチなどの規則的な探索よりもラン ダムサーチによるランダムな探索のほうがより良い結果になることが報告されている1。学 習のためのエポックを小さくして、1回の評価に要する時間を短縮するのも有効である。 機械学習の問題では、過学習が問題になることが多くある。過学習とは、訓練データに適 合しすぎてしまい、訓練データには含まれないほかのデータにはうまく対応できない状態 を言う。過学習が起きる原因には主に次のことが考えられる。 ・パラメータをたくさん持ち、表現力の高いモデルである。 ・訓練データが少ない。 過学習の抑制のために用いられる手法の一つに、 荷重減衰 (Weight Decay) (L2 正則化) がある。これは学習の過程において大きな重みをもつことに対してペナルティを課すこと で、過学習を抑制しようとする。 もう一つの方法として、ドロップアウトがある。この方法では、訓練時に隠れ層のニュー 1 J. Bergstra and Y. Bengio, Random Search for Hyper-Parameter Optimization, J. Machine Learning Research, 13, 281-305, 2012.
  • 10. ロンをランダムに選び出し、消去しながら学習する方法である。 Batch Normalization は、2015 年に考案された手法であり、次の利点がある。 ・学習を早く進行させることができる。 (学習係数を大きくすることができる。 ) ・初期値にそれほど依存しない。 ・過学習を抑制する。 (Dropout などの必要性を減らす。 ) データの正規化を行う Batch Normalization レイヤをニューラルネットワークに挿入す るだけである。 畳み込みニューラルネットワーク(CNN)は、画像認識や音声認識で用いられる。 CNN のネットワーク構造は、 「Convolution レイヤ(畳み込み層) 」 、 「Pooling レイヤ(プ ーリング層) 」を「Affine レイヤ(全結合層) 」で結ぶ構造となっている(図 1) 。 図 1 CNN のネットワーク構造 ※出典:DeepAge、https://deepage.net/categories/deep_learning/ 認識精度を高めるための方法はいくつかあり、アンサンブル学習、学習係数の減衰、デー タ拡張などがある。データ拡張では、回転や移動による変形のほか、画像の中から一部を切 り出す「crop 処理」 、左右をひっくり返す「flip 処理」などがある。 層を深くすること(主に中間層の数を多くすること)の利点の一つは、ネットワークのパ ラメータ数を少なくすることができる点である。 つまり、 より少ないパラメータで層を深く しない場合と同じレベル (あるいはそれ以上) の表現力が達成できる。 その他の利点として、 より少ない学習データで、高速に学習を行うことができる。 ディープラーニングの高速化について、近年では、GPU を搭載したディープラーニング 専用の PC での実行や Google Colaboratory による実行 (無料で高機能な Nvidia 社の Tesra K80 GPU を利用することができる。 )が有効である。 ※出典:Analytics Board、https://su-gi-rx.com/archives/4670