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
Chainerによる深層学習(3)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
youichiro
March 08, 2017
Technology
0
160
Chainerによる深層学習(3)
長岡技術科学大学
自然言語処理研究室
B3ゼミ発表(第7回)
youichiro
March 08, 2017
Tweet
Share
More Decks by youichiro
See All by youichiro
日本語文法誤り訂正における誤り傾向を考慮した擬似誤り生成
youichiro
0
1.6k
分類モデルを用いた日本語学習者の格助詞誤り訂正
youichiro
0
120
Multi-Agent Dual Learning
youichiro
1
190
Automated Essay Scoring with Discourse-Aware Neural Models
youichiro
0
140
Context is Key- Grammatical Error Detection with Contextual Word Representations
youichiro
1
160
勉強勉強会
youichiro
0
100
Confusionset-guided Pointer Networks for Chinese Spelling Check
youichiro
0
210
A Neural Grammatical Error Correction System Built On Better Pre-training and Sequential Transfer Learning
youichiro
0
190
An Empirical Study of Incorporating Pseudo Data into Grammatical Error Correction
youichiro
0
220
Other Decks in Technology
See All in Technology
Claude Codeの進化と各機能の活かし方
oikon48
22
12k
AIエージェント時代に備える AWS Organizations とアカウント設計
kossykinto
3
770
非情報系研究者へ送る Transformer入門
rishiyama
11
7.1k
JAWSDAYS2026_A-6_現場SEが語る 回せるセキュリティ運用~設計で可視化、AIで加速する「楽に回る」運用設計のコツ~
shoki_hata
0
3k
Evolution of Claude Code & How to use features
oikon48
1
590
PMBOK第8版は第7版から何が変わったのか(PMBOK第8版概要解説) / 20260304 Takeshi Watarai
shift_evolve
PRO
0
200
ナレッジワークのご紹介(第88回情報処理学会 )
kworkdev
PRO
0
180
新職業『オーケストレーター』誕生 — エージェント10体を同時に回すAgentOps
gunta
4
1.8k
ナレッジワーク IT情報系キャリア研究セッション資料(情報処理学会 第88回全国大会 )
kworkdev
PRO
0
170
Scrumは歪む — 組織設計の原理原則
dashi
0
120
OCI技術資料 : コンピュート・サービス 概要
ocise
4
54k
AWS DevOps Agent vs SRE俺 / AWS DevOps Agent vs me, the SRE
sms_tech
3
540
Featured
See All Featured
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
260
A Tale of Four Properties
chriscoyier
163
24k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Side Projects
sachag
455
43k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
190
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
290
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
140
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
69
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Transcript
Chainerによる深層学習 (3) 平成29年3月9日 長岡技術科学大学 自然言語処理研究室 小川耀一朗
Chainerによる分類問題 1/26
プログラムの全体図 2/26
Irisデータ • 150個のアヤメのデータ • データ: 花びらの長さ、幅、がく片の長さ、幅 • アヤメの種類: setosa(0)、versicolor(1)、virginica(2) 例)
[ 5.0999999 3.5 1.39999998 0.2 ] => 0 [ 7. 3.20000005 4.69999981 1.39999998] => 1 [ 6.30000019 3.29999995 6. 2.5 ] => 2 訓練データ → 奇数番目のデータ75個 テストデータ → 偶数番目のデータ75個 3/26
Irisデータの用意 4/26
Irisデータの用意 Irisデータはscikit-learnに付属しているものを使う scikit-learn: 機械学習ライブラリ 分類や回帰、クラスタリングなどの機能が実装されている 5/26
Irisデータの用意 X : 花のデータ >>>print(X) [[ 5.0999999 3.5 1.39999998 0.2
] [ 4.9000001 3. 1.39999998 0.2 ] … [ 5.9000001 3. 5.0999999 1.79999995]] 6/26
Irisデータの用意 Y : 教師データ >>>print(Y) [0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2] 7/26
Irisデータの用意 Y2 : 教師データ(変形) >>>print(Y2) [[ 1. 0. 0.] [
1. 0. 0.] … [ 0. 0. 1.]] 8/26
訓練データ、テストデータの用意 9/26
訓練データ、テストデータの用意 奇数番目のXデータ → 訓練データ 奇数番目のY2データ → 訓練用の教師データ 10/26
訓練データ、テストデータの用意 偶数番目のXデータ → テストデータ 偶数番目のYデータ → 正解データ 11/26
モデルの定義 12/26
モデルの定義 13 入力:花びらの長さ、幅、がく片の長さ、幅 → 4次元 出力:setosa(0)、versicolor(1)、virginica(2) → 3次元 /26
モデルの定義 14 入力層→中間層:シグモイド関数 中間層→出力層:そのまま 損失関数:二乗誤差 /26
パラメータの学習 15/26
パラメータの学習 16/26
パラメータの学習 17 おまじない /26
パラメータの学習 18 ミニバッチ処理 1回のパラメータ更新にランダムに 取り出した25個の訓練データを使う /26
パラメータの学習 19 5000回繰り返す /26
パラメータの学習 20/26
評価 21/26
評価 22 テストデータをモデルに投入し、予測データを得る テストでは勾配を求める必要はないので Variable変数をvolatile=‘on’にする >>>print(ans) [[ 1.01755786e+00 1.39655769e-02 -2.12547127e-02]
[ 9.83523667e-01 3.55108976e-02 -3.01905852e-02] [ 1.03329992e+00 -1.48231089e-02 -1.54979099e-02] … [ -1.24957561e-01 2.79694885e-01 8.36571217e-01]] /26
評価 23 nrow = 75 ncol = 3 /26
評価 24 予測の最大が正解データと一致したら ok+1 >>>print(“{} {}”.format(ans[30], yans[30])) [ 0.0668037 0.80043787
0.15562642] 1 /26
評価 25/26
発表内容 26 • ChainerによるIrisデータの分類 参考文献 「Chainerによる実践深層学習」第4章 新納 浩幸 著 オーム社
/26