SlideShare a Scribd company logo
田中正行
PRMU研究会2019/02
深層学習に関する
(個人的な)取り組みの紹介
概要
1
1.mgq (Minimal Gram task Queue)
2.train1000 (Train with small samples)
3.WiG (Weighted Sigmoid Gate Unit)
(便利な)シンプルタスクキュー
(練習用)小サンプル学習
新しい活性化関数
https://github.com/likesilkto/mgqueue
http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/
http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/WiG/
タスクキューと深層学習
2 時間
18:00
20:00
22:00
00:00
02:00
04:00
06:00
08:00
10:00
GPU0 GPU1
Task0
Task1
Task2
Task3
(少ない)GPU資源を効率的に活
用したい
処理終了後,すぐに次の処理を行
いたい!
mgq (Minimal Gram task Queue)
3
https://github.com/likesilkto/mgqueue
% pip install git+https://github.com/likesilkto/mgqueue
インストール:
python application
タスク追加:
% mgq queue_name ad ‘python train1.py’
% mgq queue_name ad ‘python train2.py’
スタート:
% mgq queue_name start
% mgq queue_name start –gmail [@マークより前のgmail アカウント]
タスク追加:
% mgq queue_name ad ‘python train3.py’
Train1000 project
4
http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/
Cifar-10, 100
学習データ数: 50,000枚
テストデータ数:10,000枚
GPUを使って学習に数時間かかる
いろいろ試すには時間がかかるし,
初学者の練習には大変
少数データから学習できるのか?
1,000個の少数データから、
どれくらい性能が出せるのか?
#train1000
Train1000 project
5
http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/
#train1000
mnist
100 samples x 10 classes = 1,000 samples Test Acc.: 0.9786
fashion_mnist
100 samples x 10 classes = 1,000 samples Test Acc.: 0.8159
cifar-10
100 samples x 10 classes = 1,000 samples Test Acc.: 0.5295
cifar-100
10 samples x 100 classes = 1,000 samples Test Acc.: 0.1676
概要
6
1.mgq (Minimal Gram task Queue)
2.train1000 (Train with small samples)
3.WiG (Weighted Sigmoid Gate Unit)
(便利な)シンプルタスクキュー
(練習用)小サンプル学習
新しい活性化関数
https://github.com/likesilkto/mgqueue
http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/
http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/WiG/
Activation Functions for DNNs
Input
x
Activation
function
Weight
Output
y
Conv.
Activation
function
Input
x
Output
y
Activation functions
Sigmoid tanh ReLU
𝜎𝜎 𝑥𝑥 =
1
1 + 𝑒𝑒−𝑥𝑥
max(𝑥𝑥, 0)
Advanced Activation Functions
ReLU
max(𝑥𝑥, 0)
�
𝑥𝑥 (𝑥𝑥 ≥ 0)
𝛼𝛼𝛼𝛼 (𝑥𝑥 < 0)
Leaky ReLU
Parametric ReLU
swish, SiL
𝑥𝑥 𝜎𝜎 𝑤𝑤𝑤𝑤 + 𝑏𝑏
Existing activation functions are
element-wise function.
Dying ReLU:
Dead ReLU units always
return zero.
WiG: Weighted Sigmoid Gate (Proposed)
Existing activation functions are
element-wise function.
Sigmoid Gated Network can be
used as activation function.
Weight
Activation
function
Weight
Activation
networkunit
Proposed WiG (Weighted sigmoid gate unit)
W ×
Wg
WiG activation unit
It is compatible to existing activation functions.
It includes the ReLU.
Sigmoid
W
Wg
×
My recommendation is:
You can improve the network performance just by
replacing the ReLU by the proposed WiG.
WiG: Three-state
10
𝒚𝒚 = 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 ⊗ (𝑾𝑾𝑾𝑾 + 𝒃𝒃)
人の網膜細胞
オン中心型受容野
オフ中心型受容野
中心が明るいほど
大きな出力
中心が暗いほど
大きな出力
反応なし
⊗
反応の大きさ閾値制御
(符号付の)
反応の大きさ制御
閾値制御
独立に制御できる
(かもしれない)
Uchida, Coupled convolution layer for convolutional neural network, 2018
WiG: 側抑制
11
脳の測抑制
WiGは測抑制を実現できる!
測抑制
ニューロンの空間分布
大きな反応の周辺のニューロンの
反応が抑制される
𝒚𝒚 = 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 ⊗ (𝑾𝑾𝑾𝑾 + 𝒃𝒃)
⊗
反応の大きさ閾値制御
要素独立の活性化関数
測抑制は実現不可能
測抑制を実現するWgを簡単に設計可能
WiG with sparseness constraint
12
𝒚𝒚 = 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 ⊗ (𝑾𝑾𝑾𝑾 + 𝒃𝒃)
スパースネス: yの非ゼロ要素が少ない
スパースネス拘束: 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 1
WiG  ReLU
13
𝒚𝒚 = 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 ⊗ (𝑾𝑾𝑾𝑾 + 𝒃𝒃)
𝑦𝑦 = 𝜎𝜎(𝛼𝛼𝛼𝛼) × 𝑥𝑥
𝑦𝑦 = 𝜎𝜎(𝛼𝛼𝛼𝛼)
𝛼𝛼 → ∞
𝑦𝑦 = �
0 (𝑥𝑥 < 0)
1 (𝑥𝑥 ≥ 0)
𝑦𝑦 = 𝜎𝜎(𝛼𝛼𝛼𝛼) × 𝑥𝑥
𝛼𝛼 → ∞
𝑦𝑦 = max(0, 𝑥𝑥)
WiGはReLUを再現できる!
既存ネットワークのReLUをWiGに置き換えて,
高性能化できる!(かも)
Experimental Validations
Object recognition
Average accuracy
Image denoising
The reproduction code is available
http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/WiG/
まとめ
15
1.mgq (Minimal Gram task Queue)
2.train1000 (Train with small samples)
3.WiG (Weighted Sigmoid Gate Unit)
(便利な)シンプルタスクキュー
(練習用)小サンプル学習
新しい活性化関数
https://github.com/likesilkto/mgqueue
http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/
http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/WiG/

More Related Content

PDF
GCを発生させないJVMとコーディングスタイル
PDF
Groongaの特徴
PDF
Mroonga Meetup 2014/06/29
PDF
Droongaのはじめかた
PDF
2009/12/10 GPUコンピューティングの現状とスーパーコンピューティングの未来
PDF
A100 GPU 搭載! P4d インスタンス 使いこなしのコツ
PDF
MroongaとPGroonga
PDF
初心者向けMroonga・PGroonga情報
GCを発生させないJVMとコーディングスタイル
Groongaの特徴
Mroonga Meetup 2014/06/29
Droongaのはじめかた
2009/12/10 GPUコンピューティングの現状とスーパーコンピューティングの未来
A100 GPU 搭載! P4d インスタンス 使いこなしのコツ
MroongaとPGroonga
初心者向けMroonga・PGroonga情報

What's hot (20)

PDF
EnrootとPyxisで快適コンテナ生活
PDF
自作GPUへの道
PDF
【旧版】2009/12/10 GPUコンピューティングの現状とスーパーコンピューティングの未来
PDF
データ圧縮アルゴリズムを用いたマルウェア感染通信ログの判定
PDF
45分で理解する 最近のスパコン事情 斉藤之雄
PDF
Blueqat SDKハンズオン
PDF
Prometheus at Preferred Networks
PDF
Ncnn a universal and efficient neural network inference with vulkan
PDF
Automatic Mixed Precision の紹介
PDF
Isca13 study
PDF
Challengers 2013 winter ハッカソンに参加してみて
PDF
モバイル(エッジ)向け ニューラルネットワーク推論エンジンの紹介
PDF
Chainer で Tensor コア (fp16) を使いこなす
PDF
JubaQLご紹介
PPTX
関東GPGPU勉強会資料
PPTX
MySQLやSSDとかの話・前編
PDF
2015年度GPGPU実践基礎工学 第1回 学際的分野における先端シミュレーション技術の歴史
PDF
Arduinoでプログラミングに触れてみよう 続編
PDF
Chainer でのプロファイリングをちょっと楽にする話
PDF
Arduinoでプログラミングに触れてみよう
EnrootとPyxisで快適コンテナ生活
自作GPUへの道
【旧版】2009/12/10 GPUコンピューティングの現状とスーパーコンピューティングの未来
データ圧縮アルゴリズムを用いたマルウェア感染通信ログの判定
45分で理解する 最近のスパコン事情 斉藤之雄
Blueqat SDKハンズオン
Prometheus at Preferred Networks
Ncnn a universal and efficient neural network inference with vulkan
Automatic Mixed Precision の紹介
Isca13 study
Challengers 2013 winter ハッカソンに参加してみて
モバイル(エッジ)向け ニューラルネットワーク推論エンジンの紹介
Chainer で Tensor コア (fp16) を使いこなす
JubaQLご紹介
関東GPGPU勉強会資料
MySQLやSSDとかの話・前編
2015年度GPGPU実践基礎工学 第1回 学際的分野における先端シミュレーション技術の歴史
Arduinoでプログラミングに触れてみよう 続編
Chainer でのプロファイリングをちょっと楽にする話
Arduinoでプログラミングに触れてみよう
Ad

Similar to PRMU201902 Presentation document (9)

PDF
Deep learning実装の基礎と実践
PPTX
落合 Wba hackathon2_成果報告_最終版
PDF
第9回ACRiウェビナー_日立/島田様ご講演資料
PDF
「ゼロから作るDeep learning」の畳み込みニューラルネットワークのハードウェア化
PPTX
機械学習 / Deep Learning 大全 (6) Library編
PDF
GCをみればRTSが見えてくる、かも。。。
PDF
Iceberg 2018 (Japanese translation)
PDF
アドテク×Scala×パフォーマンスチューニング
PDF
2値ディープニューラルネットワークと組込み機器への応用: 開発中のツール紹介
Deep learning実装の基礎と実践
落合 Wba hackathon2_成果報告_最終版
第9回ACRiウェビナー_日立/島田様ご講演資料
「ゼロから作るDeep learning」の畳み込みニューラルネットワークのハードウェア化
機械学習 / Deep Learning 大全 (6) Library編
GCをみればRTSが見えてくる、かも。。。
Iceberg 2018 (Japanese translation)
アドテク×Scala×パフォーマンスチューニング
2値ディープニューラルネットワークと組込み機器への応用: 開発中のツール紹介
Ad

More from Masayuki Tanaka (20)

PDF
Slideshare breaking inter layer co-adaptation
PDF
Gradient-Based Low-Light Image Enhancement
PDF
Year-End Seminar 2018
PPTX
遠赤外線カメラと可視カメラを利用した悪条件下における画像取得
PPTX
Learnable Image Encryption
PDF
クリエイティブ・コモンズ
PDF
デザイン4原則
PDF
メラビアンの法則
PDF
類似性の法則
PDF
権威に訴える論証
PDF
Chain rule of deep neural network layer for back propagation
PDF
Give Me Four
PDF
Tech art 20170315
PDF
My Slide Theme
PDF
Font Memo
PPT
One-point for presentation
PPTX
ADMM algorithm in ProxImaL
PPTX
Intensity Constraint Gradient-Based Image Reconstruction
PPTX
Least Square with L0, L1, and L2 Constraint
PPTX
Lasso regression
Slideshare breaking inter layer co-adaptation
Gradient-Based Low-Light Image Enhancement
Year-End Seminar 2018
遠赤外線カメラと可視カメラを利用した悪条件下における画像取得
Learnable Image Encryption
クリエイティブ・コモンズ
デザイン4原則
メラビアンの法則
類似性の法則
権威に訴える論証
Chain rule of deep neural network layer for back propagation
Give Me Four
Tech art 20170315
My Slide Theme
Font Memo
One-point for presentation
ADMM algorithm in ProxImaL
Intensity Constraint Gradient-Based Image Reconstruction
Least Square with L0, L1, and L2 Constraint
Lasso regression

PRMU201902 Presentation document

  • 2. 概要 1 1.mgq (Minimal Gram task Queue) 2.train1000 (Train with small samples) 3.WiG (Weighted Sigmoid Gate Unit) (便利な)シンプルタスクキュー (練習用)小サンプル学習 新しい活性化関数 https://github.com/likesilkto/mgqueue http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/ http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/WiG/
  • 4. mgq (Minimal Gram task Queue) 3 https://github.com/likesilkto/mgqueue % pip install git+https://github.com/likesilkto/mgqueue インストール: python application タスク追加: % mgq queue_name ad ‘python train1.py’ % mgq queue_name ad ‘python train2.py’ スタート: % mgq queue_name start % mgq queue_name start –gmail [@マークより前のgmail アカウント] タスク追加: % mgq queue_name ad ‘python train3.py’
  • 5. Train1000 project 4 http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/ Cifar-10, 100 学習データ数: 50,000枚 テストデータ数:10,000枚 GPUを使って学習に数時間かかる いろいろ試すには時間がかかるし, 初学者の練習には大変 少数データから学習できるのか? 1,000個の少数データから、 どれくらい性能が出せるのか? #train1000
  • 6. Train1000 project 5 http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/ #train1000 mnist 100 samples x 10 classes = 1,000 samples Test Acc.: 0.9786 fashion_mnist 100 samples x 10 classes = 1,000 samples Test Acc.: 0.8159 cifar-10 100 samples x 10 classes = 1,000 samples Test Acc.: 0.5295 cifar-100 10 samples x 100 classes = 1,000 samples Test Acc.: 0.1676
  • 7. 概要 6 1.mgq (Minimal Gram task Queue) 2.train1000 (Train with small samples) 3.WiG (Weighted Sigmoid Gate Unit) (便利な)シンプルタスクキュー (練習用)小サンプル学習 新しい活性化関数 https://github.com/likesilkto/mgqueue http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/ http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/WiG/
  • 8. Activation Functions for DNNs Input x Activation function Weight Output y Conv. Activation function Input x Output y Activation functions Sigmoid tanh ReLU 𝜎𝜎 𝑥𝑥 = 1 1 + 𝑒𝑒−𝑥𝑥 max(𝑥𝑥, 0)
  • 9. Advanced Activation Functions ReLU max(𝑥𝑥, 0) � 𝑥𝑥 (𝑥𝑥 ≥ 0) 𝛼𝛼𝛼𝛼 (𝑥𝑥 < 0) Leaky ReLU Parametric ReLU swish, SiL 𝑥𝑥 𝜎𝜎 𝑤𝑤𝑤𝑤 + 𝑏𝑏 Existing activation functions are element-wise function. Dying ReLU: Dead ReLU units always return zero.
  • 10. WiG: Weighted Sigmoid Gate (Proposed) Existing activation functions are element-wise function. Sigmoid Gated Network can be used as activation function. Weight Activation function Weight Activation networkunit Proposed WiG (Weighted sigmoid gate unit) W × Wg WiG activation unit It is compatible to existing activation functions. It includes the ReLU. Sigmoid W Wg × My recommendation is: You can improve the network performance just by replacing the ReLU by the proposed WiG.
  • 11. WiG: Three-state 10 𝒚𝒚 = 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 ⊗ (𝑾𝑾𝑾𝑾 + 𝒃𝒃) 人の網膜細胞 オン中心型受容野 オフ中心型受容野 中心が明るいほど 大きな出力 中心が暗いほど 大きな出力 反応なし ⊗ 反応の大きさ閾値制御 (符号付の) 反応の大きさ制御 閾値制御 独立に制御できる (かもしれない) Uchida, Coupled convolution layer for convolutional neural network, 2018
  • 12. WiG: 側抑制 11 脳の測抑制 WiGは測抑制を実現できる! 測抑制 ニューロンの空間分布 大きな反応の周辺のニューロンの 反応が抑制される 𝒚𝒚 = 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 ⊗ (𝑾𝑾𝑾𝑾 + 𝒃𝒃) ⊗ 反応の大きさ閾値制御 要素独立の活性化関数 測抑制は実現不可能 測抑制を実現するWgを簡単に設計可能
  • 13. WiG with sparseness constraint 12 𝒚𝒚 = 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 ⊗ (𝑾𝑾𝑾𝑾 + 𝒃𝒃) スパースネス: yの非ゼロ要素が少ない スパースネス拘束: 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 1
  • 14. WiG  ReLU 13 𝒚𝒚 = 𝜎𝜎 𝑾𝑾𝒈𝒈 𝒙𝒙 + 𝒃𝒃𝒈𝒈 ⊗ (𝑾𝑾𝑾𝑾 + 𝒃𝒃) 𝑦𝑦 = 𝜎𝜎(𝛼𝛼𝛼𝛼) × 𝑥𝑥 𝑦𝑦 = 𝜎𝜎(𝛼𝛼𝛼𝛼) 𝛼𝛼 → ∞ 𝑦𝑦 = � 0 (𝑥𝑥 < 0) 1 (𝑥𝑥 ≥ 0) 𝑦𝑦 = 𝜎𝜎(𝛼𝛼𝛼𝛼) × 𝑥𝑥 𝛼𝛼 → ∞ 𝑦𝑦 = max(0, 𝑥𝑥) WiGはReLUを再現できる! 既存ネットワークのReLUをWiGに置き換えて, 高性能化できる!(かも)
  • 15. Experimental Validations Object recognition Average accuracy Image denoising The reproduction code is available http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/WiG/
  • 16. まとめ 15 1.mgq (Minimal Gram task Queue) 2.train1000 (Train with small samples) 3.WiG (Weighted Sigmoid Gate Unit) (便利な)シンプルタスクキュー (練習用)小サンプル学習 新しい活性化関数 https://github.com/likesilkto/mgqueue http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/train1000/ http://www.ok.sc.e.titech.ac.jp/~mtanaka/proj/WiG/