SlideShare a Scribd company logo
ChainerでDeep Learningを
試す為に必要なこと
株式会社 レトリバ
西鳥羽二郎
自己紹介
• 西鳥羽二郎
• ID: jnishi
• 略歴
• 東京大学情報理工学系研究科コンピュータ科学専攻 修士課程卒業
• 2006年 Preferred Infrastructureに創業メンバーとして参画
• プロトタイプ開発
• プロフェッショナルサービス・サポートサービス
• 研究開発
• 2016年 レトリバ創業
• 取締役・リサーチャーとして研究開発に従事
• 主に音声認識や自然言語処理を担当
Deep Learning(DL)への取り組み
• 2015年 3月頃に音声認識でDLが使えそうなことを知る
• 2015年 6月からChaierを用いて音声認識エンジンの開発開始
• 最適化関数 NesterovAG
• 活性化関数 ClippedReLU
• 損失関数 Connectionist Temporal Classification
Torch7: Baiduが
2016年1月に公開
TensorFlow:
2016年2月に搭載
Chainer: 2015年
10月に搭載
Deep Learningの手法をためそう!
Deep Learningの手法をためそう!
Deep Learningの手法をためそう!
Deep Learningの手法をためそう!
tterance at atime with better results than evaluating with alargebatch.
ples of varying length posesomealgorithmic challenges. Onepossible solution is
opagation through time [68], so that all examples have the same sequence length
2]. However, this can inhibit the ability to learn longer term dependencies. Other
that presenting examples in order of difficulty can accelerate online learning [6,
theme in many sequence learning problems including machine translation and
n isthat longer examples tend to bemorechallenging [11].
ction that weuseimplicitly depends on thelength of theutterance,
L(x, y; ✓) = − log
X
`2 Align(x,y)
TY
t
pctc(`t |x; ✓). (9)
is the set of all possible alignments of the characters of the transcription y to
under theCTC operator. In equation 9, theinner term isaproduct over time-steps
which shrinks with the length of the sequence since pctc(`t |x; ✓) < 1. This moti-
OK実装だ!
Deep Learningの手法をためそう!
tterance at atime with better results than evaluating with alargebatch.
ples of varying length posesomealgorithmic challenges. Onepossible solution is
opagation through time [68], so that all examples have the same sequence length
2]. However, this can inhibit the ability to learn longer term dependencies. Other
that presenting examples in order of difficulty can accelerate online learning [6,
theme in many sequence learning problems including machine translation and
n isthat longer examples tend to bemorechallenging [11].
ction that weuseimplicitly depends on thelength of theutterance,
L(x, y; ✓) = − log
X
`2 Align(x,y)
TY
t
pctc(`t |x; ✓). (9)
is the set of all possible alignments of the characters of the transcription y to
under theCTC operator. In equation 9, theinner term isaproduct over time-steps
which shrinks with the length of the sequence since pctc(`t |x; ✓) < 1. This moti-
OK実装だ!
見るべきところ
• BaiduのDeep Specch2
見るべきところ
• Googleの音声認識
見るべきところ
• Microsoftの画像認識
Deep Learningのシステムを実装する際
• きちんと処理を理解するには数式を理解することが大事
• 実際に処理を記述する際には構造を図示したグラフを見ること
が多い
ニューラルネットワークの基本単位
x1
x2
xn
…
n個の入力 1個の出力
w1
w2
wn
u = w1x1 + w2x2 + …+ wnxn
ユニット
ニューラルネットワークの基本
x1
x2
xn
…
n個の入力 m個の出力
…
入力を同じとするユニットをたくさん並べる
ニューラルネットワーク(全結合)
x1
x2
xn
…
n個の入力 m個の入力
…
入
力
Linear
活性化関数
x1
x2
xn
…
u
出力にスケーリングや制限を
かける処理を行うことがある
活性化関数の例
• ReLU: 負の時は0にする
• sigmoid: 大小関係を維したまま0〜1にする
• tanh: 大小関係を維持したまま-1〜1にする
活性化関数も同様に表せる
入
力
Linear
ReLU
ネットワークとして示す
• ニューラルネットワーク以下のものをコンポーネントとする
ネットワークで表すことができる
• 入力
• Linear
• 活性化関数
• 損失関数
• Convolution層
• 正則化関数
• etc.
ネットワークの読み方
• BaiduのDeep Specch2
ネットワークの読み方
• BaiduのDeep Specch2
入力
ネットワークの読み方
• BaiduのDeep Specch2
Convolution層を
3段つなげる
ネットワークの読み方
• BaiduのDeep Specch2
RNNを7層
ネットワークの読み方
• BaiduのDeep Specch2
BatchNormalization
を正則化として用いる
ネットワークの読み方
• BaiduのDeep Specch2
Linearを1層用いる
ネットワークの読み方
• BaiduのDeep Specch2
CTCという
損失関数を用いる
Deep Learningを行う際に必要なこと
• forward処理
• back propagation
• 行列計算
• 微分計算
• 処理に用いる関数
• 入出力の関係
• 入力の大きさ
• 出力の大きさ
フレームワークが実行
フレームワークを用いて
実装する時に考えること
Chainerのexampleコード
class MLP(Chain):
def __init__(self, n_units=100, n_out=10):
super(MLP, self).__init__(
l1=L.Linear(None, n_units),
l2=L.Linear(None, n_units),
l3=L.Linear(None, n_out),
)
def __call__(self, x):
h1 = F.relu(self.l1(x))
h2 = F.relu(self.l2(h1))
y = self.l3(h2)
return y
Linear
MNIST画像
Linear
Linear
784(28x28)
100
100
0〜9の判定
10
layer1
class MLP(Chain):
def __init__(self, n_units=100, n_out=10):
super(MLP, self).__init__(
l1=L.Linear(None, n_units),
l2=L.Linear(None, n_units),
l3=L.Linear(None, n_out),
)
def __call__(self, x):
h1 = F.relu(self.l1(x))
h2 = F.relu(self.l2(h1))
y = self.l3(h2)
return y
Linear
MNIST画像
Linear
Linear
784(28x28)
100
100
0〜9の判定
10
l1
layer2
class MLP(Chain):
def __init__(self, n_units=100, n_out=10):
super(MLP, self).__init__(
l1=L.Linear(None, n_units),
l2=L.Linear(None, n_units),
l3=L.Linear(None, n_out),
)
def __call__(self, x):
h1 = F.relu(self.l1(x))
h2 = F.relu(self.l2(h1))
y = self.l3(h2)
return y
Linear
MNIST画像
Linear
Linear
784(28x28)
100
100
0〜9の判定
10
l1
l2
layer3
class MLP(Chain):
def __init__(self, n_units=100, n_out=10):
super(MLP, self).__init__(
l1=L.Linear(None, n_units),
l2=L.Linear(None, n_units),
l3=L.Linear(None, n_out),
)
def __call__(self, x):
h1 = F.relu(self.l1(x))
h2 = F.relu(self.l2(h1))
y = self.l3(h2)
return y
Linear
MNIST画像
Linear
Linear
784(28x28)
100
100
0〜9の判定
10
l1
l2
l3
forward処理
class MLP(Chain):
def __init__(self, n_units=100, n_out=10):
super(MLP, self).__init__(
l1=L.Linear(None, n_units),
l2=L.Linear(None, n_units),
l3=L.Linear(None, n_out),
)
def __call__(self, x):
h1 = F.relu(self.l1(x))
h2 = F.relu(self.l2(h1))
y = self.l3(h2)
return y
Linear
MNIST画像
Linear
Linear
x
h1
h2
0〜9の判定
y
l1
l2
l3
forward処理
class MLP(Chain):
def __init__(self, n_units=100, n_out=10):
super(MLP, self).__init__(
l1=L.Linear(None, n_units),
l2=L.Linear(None, n_units),
l3=L.Linear(None, n_out),
)
def __call__(self, x):
h1 = F.relu(self.l1(x))
h2 = F.relu(self.l2(h1))
y = self.l3(h2)
return y
Linear
MNIST画像
Linear
Linear
x
h1
h2
0〜9の判定
y
l1
l2
l3
forward処理
class MLP(Chain):
def __init__(self, n_units=100, n_out=10):
super(MLP, self).__init__(
l1=L.Linear(None, n_units),
l2=L.Linear(None, n_units),
l3=L.Linear(None, n_out),
)
def __call__(self, x):
h1 = F.relu(self.l1(x))
h2 = F.relu(self.l2(h1))
y = self.l3(h2)
return y
Linear
MNIST画像
Linear
Linear
x
h1
h2
0〜9の判定
y
l1
l2
l3
まとめ
• Deep Learningを行う際にはネットワーク構造が大事
• 構造が決まれば後はフレームワークが処理を行う
• Chainerの場合、MNISTのtrain_example.pyの例がシンプル
• Chainerに限らない
最後に
• “自明でない抽象化には程度の差こそあれ、漏れはある”
• “漏れのある抽象化の法則にうまく対処する唯一の方法は、そ
の抽象化がどのように機能し、それが何を抽象化しているかを
学ぶことだ”
• from Joel on Software
• Deep Learningの場合
• 使いたい関数がない
• GPUのメモリを食い尽くす
• 学習が収束しない

More Related Content

PPTX
数式がわからなくたってDeep Learningやってみたい!人集合- dots. DeepLearning部 発足!
PPTX
ChainerでDeep Learningを試すために必要なこと
PPTX
「機械学習とは?」から始める Deep learning実践入門
PDF
ディープラーニング最近の発展とビジネス応用への課題
PPTX
【2017年】ディープラーニングのフレームワーク比較
PDF
最近のDeep Learning (NLP) 界隈におけるAttention事情
PDF
LCCC2010:Learning on Cores, Clusters and Cloudsの解説
PDF
ディープニューラルネット入門
数式がわからなくたってDeep Learningやってみたい!人集合- dots. DeepLearning部 発足!
ChainerでDeep Learningを試すために必要なこと
「機械学習とは?」から始める Deep learning実践入門
ディープラーニング最近の発展とビジネス応用への課題
【2017年】ディープラーニングのフレームワーク比較
最近のDeep Learning (NLP) 界隈におけるAttention事情
LCCC2010:Learning on Cores, Clusters and Cloudsの解説
ディープニューラルネット入門

What's hot (20)

PDF
TensorFlowとは? ディープラーニング (深層学習) とは?
PDF
Chainerの使い方と 自然言語処理への応用
PPTX
Interop2017
PDF
Decision Transformer: Reinforcement Learning via Sequence Modeling
PDF
Introduction to Chainer (LL Ring Recursive)
PDF
第1回 Jubatusハンズオン
PPTX
Jupyter NotebookとChainerで楽々Deep Learning
PDF
実装ディープラーニング
PDF
Introduction to Chainer and CuPy
PDF
TensorFlowによるニューラルネットワーク入門
PDF
TensorFlowの使い方(in Japanese)
PDF
DATUM STUDIO PyCon2016 Turorial
PDF
Jubatusのリアルタイム分散レコメンデーション@TokyoWebmining#17
PDF
PythonによるDeep Learningの実装
PDF
Pythonによる機械学習入門〜基礎からDeep Learningまで〜
PDF
Development and Experiment of Deep Learning with Caffe and maf
PDF
深層学習フレームワーク Chainer の開発と今後の展開
PDF
Python 機械学習プログラミング データ分析演習編
PDF
「深層学習」勉強会LT資料 "Chainer使ってみた"
PDF
Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9
TensorFlowとは? ディープラーニング (深層学習) とは?
Chainerの使い方と 自然言語処理への応用
Interop2017
Decision Transformer: Reinforcement Learning via Sequence Modeling
Introduction to Chainer (LL Ring Recursive)
第1回 Jubatusハンズオン
Jupyter NotebookとChainerで楽々Deep Learning
実装ディープラーニング
Introduction to Chainer and CuPy
TensorFlowによるニューラルネットワーク入門
TensorFlowの使い方(in Japanese)
DATUM STUDIO PyCon2016 Turorial
Jubatusのリアルタイム分散レコメンデーション@TokyoWebmining#17
PythonによるDeep Learningの実装
Pythonによる機械学習入門〜基礎からDeep Learningまで〜
Development and Experiment of Deep Learning with Caffe and maf
深層学習フレームワーク Chainer の開発と今後の展開
Python 機械学習プログラミング データ分析演習編
「深層学習」勉強会LT資料 "Chainer使ってみた"
Jubatusのリアルタイム分散レコメンデーション@TokyoNLP#9
Ad

Viewers also liked (20)

PDF
深層学習生き地獄
PDF
Dots deep learning部_20161221
PPTX
from_beginner_to_engineer
PDF
IPAB2017 深層学習を使った新薬の探索から創造へ
PDF
GRU-Prednetを実装してみた(途中経過)
PDF
法林浩之のFIGHTING TALKS 〜生誕50周年記念試合〜
PPTX
PayPal導入事例 CrowdWorks編
PDF
初期費用ゼロ円のマイホーム For pay palイベント
PDF
iOS_Consortium_20170120
PDF
Self Introduction for people interested in me.
PPT
青本勉強会2章
PDF
来栖川電算の技術紹介
PDF
Zipf? (ジップ則のひみつ?) #DSIRNLP
PDF
Device WebAPI 20160407
PDF
日本神経回路学会セミナー「DeepLearningを使ってみよう!」資料
PDF
Chainerライブコーディング
PDF
ディープラーニング・ハンズオン勉強会161229
PDF
猫に教えてもらうルベーグ可測
PDF
S18 t0 introduction
PDF
強化学習による 「Montezuma's Revenge」への挑戦
深層学習生き地獄
Dots deep learning部_20161221
from_beginner_to_engineer
IPAB2017 深層学習を使った新薬の探索から創造へ
GRU-Prednetを実装してみた(途中経過)
法林浩之のFIGHTING TALKS 〜生誕50周年記念試合〜
PayPal導入事例 CrowdWorks編
初期費用ゼロ円のマイホーム For pay palイベント
iOS_Consortium_20170120
Self Introduction for people interested in me.
青本勉強会2章
来栖川電算の技術紹介
Zipf? (ジップ則のひみつ?) #DSIRNLP
Device WebAPI 20160407
日本神経回路学会セミナー「DeepLearningを使ってみよう!」資料
Chainerライブコーディング
ディープラーニング・ハンズオン勉強会161229
猫に教えてもらうルベーグ可測
S18 t0 introduction
強化学習による 「Montezuma's Revenge」への挑戦
Ad

Similar to ChainerでDeep Learningを試す為に必要なこと (20)

PDF
Deep Learningの基礎と応用
PPTX
Chainerで学ぶdeep learning
PDF
Chainerの使い方と自然言語処理への応用
PPTX
2017-05-30_deepleaning-and-chainer
PDF
[GTCJ2018] Optimizing Deep Learning with Chainer PFN得居誠也
PDF
Recurrent Neural Networks
PPTX
20190316_Let's try low power-consumption ai with sony's spresense hands-on
PDF
日本音響学会2017秋 ビギナーズセミナー "深層学習を深く学習するための基礎"
PDF
Raspberry Pi Deep Learning Hand-on
PDF
TensorFlow math ja 05 word2vec
PDF
20160329.dnn講演
PPT
Deep Learningの技術と未来
PDF
AIがAIを生み出す?
PDF
自然言語処理に適した ニューラルネットのフレームワーク - - - DyNet - - -
PDF
Deep Learning Chapter12
PDF
深層学習フレームワークChainerの紹介とFPGAへの期待
PDF
FPGAX2016 ドキュンなFPGA
PPTX
LUT-Network Revision2
PDF
深層学習(岡本孝之 著) - Deep Learning chap.1 and 2
PPTX
CNNチュートリアル
Deep Learningの基礎と応用
Chainerで学ぶdeep learning
Chainerの使い方と自然言語処理への応用
2017-05-30_deepleaning-and-chainer
[GTCJ2018] Optimizing Deep Learning with Chainer PFN得居誠也
Recurrent Neural Networks
20190316_Let's try low power-consumption ai with sony's spresense hands-on
日本音響学会2017秋 ビギナーズセミナー "深層学習を深く学習するための基礎"
Raspberry Pi Deep Learning Hand-on
TensorFlow math ja 05 word2vec
20160329.dnn講演
Deep Learningの技術と未来
AIがAIを生み出す?
自然言語処理に適した ニューラルネットのフレームワーク - - - DyNet - - -
Deep Learning Chapter12
深層学習フレームワークChainerの紹介とFPGAへの期待
FPGAX2016 ドキュンなFPGA
LUT-Network Revision2
深層学習(岡本孝之 著) - Deep Learning chap.1 and 2
CNNチュートリアル

More from Jiro Nishitoba (12)

PPTX
20190509 gnn public
PPTX
Retrieva seminar jelinek_20180822
PPTX
20180609 chainer meetup_es_pnet
PPTX
全体セミナー20180124 final
PPTX
深層学習による自然言語処理勉強会2章前半
PPTX
深層学習による自然言語処理勉強会3章前半
PPTX
全体セミナー20170629
PPTX
Hessian free
PPTX
Icml読み会 deep speech2
PPTX
全体セミナーWfst
PPTX
Emnlp読み会資料
PDF
Chainer meetup20151014
20190509 gnn public
Retrieva seminar jelinek_20180822
20180609 chainer meetup_es_pnet
全体セミナー20180124 final
深層学習による自然言語処理勉強会2章前半
深層学習による自然言語処理勉強会3章前半
全体セミナー20170629
Hessian free
Icml読み会 deep speech2
全体セミナーWfst
Emnlp読み会資料
Chainer meetup20151014

ChainerでDeep Learningを試す為に必要なこと