SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
ゼロから作る
Deep Learning
§3.3 ~ §3.6
今井研究室 永吉秋平
多次元配列
・数字の集合
・数字をN次元に並べる
・PythonではNumpyを用いる
5 7
1 3
5 7
行列
・Numpyの二次元配列は行列に対応する
行
列
行列の積
・行列の積の計算方法
1 × 5 + 2 × 7 = 19
3 × 5 + 4 × 7 = 43
行列の積における要素数の一致
3 × 2 2 × 2 3 × 2
・隣接する要素の数は同じ
ニューラルネットワークと行列の積
1
2
3
4
5
X × W = Y
2 2 × 3 3
𝑥1 𝑥2 𝑦1 𝑦2 𝑦3
バイアス
1 b1
b2
b3
左図のようにバイアスも
ニューロンとすることで,
まとめて表す
活性化関数
・重み付き和に
活性化関数を適用
したものを出力とする
・シグモイド関数や
ステップ関数など
h()
h()
h()
h()
h()
出力層の活性化関数
ソフトマックス関数
・実装上の注意
・オーバーフロー対策
※exp(x)は𝑒 𝑥
を表す
ソフトマックス関数の特徴
・ソフトマックス関数の出力は0 ~ 1.0
・出力の総和は1
・出力を確率とみなせる
・分類問題に用いる
出力層のニューロンの数
・クラス分類では,出力層のニューロンの数はクラス数
・例:0~9のどれなのか知りたい→10クラス
何らかの
計算
0
9
5
……
10個
MNISTデータセット
・手書き文字セットを用いる
・28×28ピクセル
・形式は1×28×28の3次元
または784の1次元
ニューラルネットワークの推論処理
・入力はMNIST
で28×28=784
・中間層は50,
100個のニューロ
ンの2つ
・出力は10
(0~9の数字に
分類する)
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
・
入力層 中間層1 中間層2 出力層
ニューラルネットワークの推論処理
・入力はMNISTで28×28=784
・中間層は50,100個のニューロンの2つ
・ここでは3層なので重みは3つ
・出力は10(0~9の数字に分類する)
X × W1 × W2 × W3 = Y
784 784×50 50×100 100×10 10
バッチ処理
・複数のデータをまとめて処理
・例:100件のデータをまとめて処理
X × W1 × W2 × W3 = Y
100×784 784×50 50×100 100×10 100×10
まとめ
・多次元配列や行列を用いると,効率的に実装ができる
・出力層の活性関数
・回帰問題→恒等関数
・分類問題→ソフトマックス関数
・分類問題の出力層のニューロンはクラスの数
・バッチ単位で処理を行うと計算が高速

Mais conteúdo relacionado

Mais procurados

[DL輪読会]Revisiting Deep Learning Models for Tabular Data (NeurIPS 2021) 表形式デー...
[DL輪読会]Revisiting Deep Learning Models for Tabular Data  (NeurIPS 2021) 表形式デー...[DL輪読会]Revisiting Deep Learning Models for Tabular Data  (NeurIPS 2021) 表形式デー...
[DL輪読会]Revisiting Deep Learning Models for Tabular Data (NeurIPS 2021) 表形式デー...Deep Learning JP
 
【論文読み会】Deep Clustering for Unsupervised Learning of Visual Features
【論文読み会】Deep Clustering for Unsupervised Learning of Visual Features【論文読み会】Deep Clustering for Unsupervised Learning of Visual Features
【論文読み会】Deep Clustering for Unsupervised Learning of Visual FeaturesARISE analytics
 
PRML勉強会 #4 @筑波大学 発表スライド
PRML勉強会 #4 @筑波大学 発表スライドPRML勉強会 #4 @筑波大学 発表スライド
PRML勉強会 #4 @筑波大学 発表スライドSatoshi Yoshikawa
 
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learningベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learningssuserca2822
 
20190706cvpr2019_3d_shape_representation
20190706cvpr2019_3d_shape_representation20190706cvpr2019_3d_shape_representation
20190706cvpr2019_3d_shape_representationTakuya Minagawa
 
深層学習の数理
深層学習の数理深層学習の数理
深層学習の数理Taiji Suzuki
 
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...Deep Learning JP
 
ベイズ最適化
ベイズ最適化ベイズ最適化
ベイズ最適化MatsuiRyo
 
DQNからRainbowまで 〜深層強化学習の最新動向〜
DQNからRainbowまで 〜深層強化学習の最新動向〜DQNからRainbowまで 〜深層強化学習の最新動向〜
DQNからRainbowまで 〜深層強化学習の最新動向〜Jun Okumura
 
論文紹介「PointNetLK: Robust & Efficient Point Cloud Registration Using PointNet」
論文紹介「PointNetLK: Robust & Efficient Point Cloud Registration Using PointNet」論文紹介「PointNetLK: Robust & Efficient Point Cloud Registration Using PointNet」
論文紹介「PointNetLK: Robust & Efficient Point Cloud Registration Using PointNet」Naoya Chiba
 
モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019Yusuke Uchida
 
[PRML] パターン認識と機械学習(第3章:線形回帰モデル)
[PRML] パターン認識と機械学習(第3章:線形回帰モデル)[PRML] パターン認識と機械学習(第3章:線形回帰モデル)
[PRML] パターン認識と機械学習(第3章:線形回帰モデル)Ryosuke Sasaki
 
機械学習のためのベイズ最適化入門
機械学習のためのベイズ最適化入門機械学習のためのベイズ最適化入門
機械学習のためのベイズ最適化入門hoxo_m
 
【基調講演】『深層学習の原理の理解に向けた理論の試み』 今泉 允聡(東大)
【基調講演】『深層学習の原理の理解に向けた理論の試み』 今泉 允聡(東大)【基調講演】『深層学習の原理の理解に向けた理論の試み』 今泉 允聡(東大)
【基調講演】『深層学習の原理の理解に向けた理論の試み』 今泉 允聡(東大)MLSE
 
【解説】 一般逆行列
【解説】 一般逆行列【解説】 一般逆行列
【解説】 一般逆行列Kenjiro Sugimoto
 
Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2
Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2
Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2Preferred Networks
 
パターン認識第9章 学習ベクトル量子化
パターン認識第9章 学習ベクトル量子化パターン認識第9章 学習ベクトル量子化
パターン認識第9章 学習ベクトル量子化Miyoshi Yuya
 
オープンワールド認識 (第34回全脳アーキテクチャ若手の会 勉強会)
オープンワールド認識 (第34回全脳アーキテクチャ若手の会 勉強会)オープンワールド認識 (第34回全脳アーキテクチャ若手の会 勉強会)
オープンワールド認識 (第34回全脳アーキテクチャ若手の会 勉強会)Takuma Yagi
 
実践コンピュータビジョン 3章 画像間の写像
実践コンピュータビジョン 3章 画像間の写像実践コンピュータビジョン 3章 画像間の写像
実践コンピュータビジョン 3章 画像間の写像yaju88
 

Mais procurados (20)

[DL輪読会]Revisiting Deep Learning Models for Tabular Data (NeurIPS 2021) 表形式デー...
[DL輪読会]Revisiting Deep Learning Models for Tabular Data  (NeurIPS 2021) 表形式デー...[DL輪読会]Revisiting Deep Learning Models for Tabular Data  (NeurIPS 2021) 表形式デー...
[DL輪読会]Revisiting Deep Learning Models for Tabular Data (NeurIPS 2021) 表形式デー...
 
【論文読み会】Deep Clustering for Unsupervised Learning of Visual Features
【論文読み会】Deep Clustering for Unsupervised Learning of Visual Features【論文読み会】Deep Clustering for Unsupervised Learning of Visual Features
【論文読み会】Deep Clustering for Unsupervised Learning of Visual Features
 
PRML勉強会 #4 @筑波大学 発表スライド
PRML勉強会 #4 @筑波大学 発表スライドPRML勉強会 #4 @筑波大学 発表スライド
PRML勉強会 #4 @筑波大学 発表スライド
 
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learningベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
ベイズ深層学習5章 ニューラルネットワークのベイズ推論 Bayesian deep learning
 
20190706cvpr2019_3d_shape_representation
20190706cvpr2019_3d_shape_representation20190706cvpr2019_3d_shape_representation
20190706cvpr2019_3d_shape_representation
 
深層学習の数理
深層学習の数理深層学習の数理
深層学習の数理
 
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
[DL輪読会] Spectral Norm Regularization for Improving the Generalizability of De...
 
ベイズ最適化
ベイズ最適化ベイズ最適化
ベイズ最適化
 
DQNからRainbowまで 〜深層強化学習の最新動向〜
DQNからRainbowまで 〜深層強化学習の最新動向〜DQNからRainbowまで 〜深層強化学習の最新動向〜
DQNからRainbowまで 〜深層強化学習の最新動向〜
 
論文紹介「PointNetLK: Robust & Efficient Point Cloud Registration Using PointNet」
論文紹介「PointNetLK: Robust & Efficient Point Cloud Registration Using PointNet」論文紹介「PointNetLK: Robust & Efficient Point Cloud Registration Using PointNet」
論文紹介「PointNetLK: Robust & Efficient Point Cloud Registration Using PointNet」
 
モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019モデルアーキテクチャ観点からの高速化2019
モデルアーキテクチャ観点からの高速化2019
 
[PRML] パターン認識と機械学習(第3章:線形回帰モデル)
[PRML] パターン認識と機械学習(第3章:線形回帰モデル)[PRML] パターン認識と機械学習(第3章:線形回帰モデル)
[PRML] パターン認識と機械学習(第3章:線形回帰モデル)
 
機械学習のためのベイズ最適化入門
機械学習のためのベイズ最適化入門機械学習のためのベイズ最適化入門
機械学習のためのベイズ最適化入門
 
【基調講演】『深層学習の原理の理解に向けた理論の試み』 今泉 允聡(東大)
【基調講演】『深層学習の原理の理解に向けた理論の試み』 今泉 允聡(東大)【基調講演】『深層学習の原理の理解に向けた理論の試み』 今泉 允聡(東大)
【基調講演】『深層学習の原理の理解に向けた理論の試み』 今泉 允聡(東大)
 
【解説】 一般逆行列
【解説】 一般逆行列【解説】 一般逆行列
【解説】 一般逆行列
 
PRML 5.3-5.4
PRML 5.3-5.4PRML 5.3-5.4
PRML 5.3-5.4
 
Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2
Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2
Kaggle Happywhaleコンペ優勝解法でのOptuna使用事例 - 2022/12/10 Optuna Meetup #2
 
パターン認識第9章 学習ベクトル量子化
パターン認識第9章 学習ベクトル量子化パターン認識第9章 学習ベクトル量子化
パターン認識第9章 学習ベクトル量子化
 
オープンワールド認識 (第34回全脳アーキテクチャ若手の会 勉強会)
オープンワールド認識 (第34回全脳アーキテクチャ若手の会 勉強会)オープンワールド認識 (第34回全脳アーキテクチャ若手の会 勉強会)
オープンワールド認識 (第34回全脳アーキテクチャ若手の会 勉強会)
 
実践コンピュータビジョン 3章 画像間の写像
実践コンピュータビジョン 3章 画像間の写像実践コンピュータビジョン 3章 画像間の写像
実践コンピュータビジョン 3章 画像間の写像
 

Mais de KCS Keio Computer Society

Large scale gan training for high fidelity natural
Large scale gan training for high fidelity naturalLarge scale gan training for high fidelity natural
Large scale gan training for high fidelity naturalKCS Keio Computer Society
 
Vector-Based navigation using grid-like representations in artificial agents
 Vector-Based navigation using grid-like representations in artificial agents Vector-Based navigation using grid-like representations in artificial agents
Vector-Based navigation using grid-like representations in artificial agentsKCS Keio Computer Society
 
ゼロから作るDeepLearning 2~3章 輪読
ゼロから作るDeepLearning 2~3章 輪読ゼロから作るDeepLearning 2~3章 輪読
ゼロから作るDeepLearning 2~3章 輪読KCS Keio Computer Society
 
[論文略説]Stochastic Thermodynamics Interpretation of Information Geometry
[論文略説]Stochastic Thermodynamics Interpretation of Information Geometry[論文略説]Stochastic Thermodynamics Interpretation of Information Geometry
[論文略説]Stochastic Thermodynamics Interpretation of Information GeometryKCS Keio Computer Society
 

Mais de KCS Keio Computer Society (20)

Large scale gan training for high fidelity natural
Large scale gan training for high fidelity naturalLarge scale gan training for high fidelity natural
Large scale gan training for high fidelity natural
 
Imagenet trained cnns-are_biased_towards
Imagenet trained cnns-are_biased_towardsImagenet trained cnns-are_biased_towards
Imagenet trained cnns-are_biased_towards
 
機械学習ゼミ: Area attenttion
機械学習ゼミ: Area attenttion機械学習ゼミ: Area attenttion
機械学習ゼミ: Area attenttion
 
機械学習ゼミ 2018/10/17
機械学習ゼミ 2018/10/17機械学習ゼミ 2018/10/17
機械学習ゼミ 2018/10/17
 
機械学習ゼミ2018 06 15
機械学習ゼミ2018 06 15機械学習ゼミ2018 06 15
機械学習ゼミ2018 06 15
 
Control by deep learning
Control by deep learningControl by deep learning
Control by deep learning
 
深層学習 第6章
深層学習 第6章深層学習 第6章
深層学習 第6章
 
Vector-Based navigation using grid-like representations in artificial agents
 Vector-Based navigation using grid-like representations in artificial agents Vector-Based navigation using grid-like representations in artificial agents
Vector-Based navigation using grid-like representations in artificial agents
 
文章生成の未解決問題
文章生成の未解決問題文章生成の未解決問題
文章生成の未解決問題
 
Word2vec alpha
Word2vec alphaWord2vec alpha
Word2vec alpha
 
テンソル代数
テンソル代数テンソル代数
テンソル代数
 
Hindsight experience replay
Hindsight experience replayHindsight experience replay
Hindsight experience replay
 
Kml 輪読514
Kml 輪読514Kml 輪読514
Kml 輪読514
 
ゼロから作るDeepLearning 5章 輪読
ゼロから作るDeepLearning 5章 輪読ゼロから作るDeepLearning 5章 輪読
ゼロから作るDeepLearning 5章 輪読
 
ELBO型VAEのダメなところ
ELBO型VAEのダメなところELBO型VAEのダメなところ
ELBO型VAEのダメなところ
 
ゼロから作るDeepLearning 2~3章 輪読
ゼロから作るDeepLearning 2~3章 輪読ゼロから作るDeepLearning 2~3章 輪読
ゼロから作るDeepLearning 2~3章 輪読
 
ゼロから作るDeepLearning 4章 輪読
ゼロから作るDeepLearning 4章 輪読ゼロから作るDeepLearning 4章 輪読
ゼロから作るDeepLearning 4章 輪読
 
Soft Actor Critic 解説
Soft Actor Critic 解説Soft Actor Critic 解説
Soft Actor Critic 解説
 
[論文略説]Stochastic Thermodynamics Interpretation of Information Geometry
[論文略説]Stochastic Thermodynamics Interpretation of Information Geometry[論文略説]Stochastic Thermodynamics Interpretation of Information Geometry
[論文略説]Stochastic Thermodynamics Interpretation of Information Geometry
 
Graph Convolutional Network 概説
Graph Convolutional Network 概説Graph Convolutional Network 概説
Graph Convolutional Network 概説
 

Último

TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 

Último (9)

TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 

ゼロから作るDeepLearning 3.3~3.6章 輪読