Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TensorFlowの基礎
Search
Norihiro Shimoda
March 20, 2017
Technology
4.6k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TensorFlowの基礎
TensorFlowの概要と技術的な基本だけをまとめました
Norihiro Shimoda
March 20, 2017
More Decks by Norihiro Shimoda
See All by Norihiro Shimoda
ぼくのかんがえたさいきょうの機械学習プロジェクト進行法(PoC/デモ編)
rindai87
10
21k
FindYourCandyでの転移学習の話
rindai87
4
17k
Google I/O 報告会(ML)担当
rindai87
3
9.8k
最近のTensorFlowの話
rindai87
1
1.6k
TensorFlowとGCPの簡単な紹介
rindai87
3
4.8k
TFv1.0の概要+HighLevelAPI/Keras
rindai87
4
2.2k
How should engineers survive during AI era
rindai87
5
28k
Let's stand up against "Do Artificial Intelligence" with proper knowledge
rindai87
6
1.9k
Talk about ML and DL for happy engineer's life
rindai87
40
15k
Other Decks in Technology
See All in Technology
レガシーコードに対する loop engineering的なAI開発プロセス導入について
kubell_hr
0
190
re:Inventで、人生は変わったのか? / growth-builders-hub-1-reinvent-2026
mhrtech
2
310
AI AgentによるEmbedded SREの取り組み
tgidgd
1
340
Patterns in AI Driven Software Development
akosma
PRO
0
480
スマートロックを支えるFlutter × ネイティブ連携の実践 / Flutter and Native Integration in Practice: Powering Smart Locks
bitkey
PRO
0
150
Active Directory と Entra ID のむむむな関係
murachiakira
PRO
2
960
なぜ東京にいる私が、新潟の技術コミュニティを運営するのか by 八雲慎之助
yakumo
0
220
AX時代の自治体支援リソース再配分と役割分担の再構成:戦略とロードマップ(概要)
sishi2026
0
190
AIで選択肢が広がった組織設計の理想と現実
konifar
16
7.7k
新卒エンジニア、 介護士になる
ryu1013
1
680
Copilot Coworkで「みのるん式」やってみた
minorun365
PRO
2
1.5k
複雑な業務システムを高速でつくるため、チーム全員をつくれる人へ
ayakurabuchi
0
130
Featured
See All Featured
Believing is Seeing
oripsolob
1
270
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
70
68k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
540
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Building AI with AI
inesmontani
PRO
1
1.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
290
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
What's in a price? How to price your products and services
michaelherold
247
13k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
470
Transcript
TensorFlowの基礎
⾃自⼰己紹介 • 下⽥田倫倫⼤大(@rindai87) • TensorFlow User Group(TFUG)主催者 • 最近GDE(Google Developer
Expert)の ML Expertになりました
TensorFlowの概要 TensorFlowとはそもそも 何かについて説明します
TensorFlowとは? • Googleがオープンソース化した機械学習 のライブラリ • 2015年年11⽉月に公開 • Google社内でも実際に使われている(と ⾔言われている)
TensorFlowのモデル 1. 学習モデルをグラフと して定義する 2. 学習を実際にどう⾏行行う かも定義する – 学習の評価⽅方法 –
最適化の⽅方法 – CPU or GPU – スタンドアロン or 分散 3. 定義に従って計算処理理 をデバイス上で実⾏行行さ せる
TensorFlowの歴史
TensorBoardなどのツール
その他のTensorFlow情報 1. Google内でのTensorFlow 2. TensorFlowの事例例 3. TensorFlowコミュニティ 4. 企業でのTensorFlow https://goo.gl/kiU4qd
TensorFlowの基本 TensorFlowを利利⽤用する上での 基本について説明します
TensorFlowにありがちな勘違い TensorFlowは深層学習に 特化したツールである 10
TensorFlowの超基本 OP Input Output OP OP Input グラフを意識識しながら処理理を記述して 最後にどびゃっと実⾏行行する 11
TensorFlowのパラダイム • はじめにテンソルの演算グラフを作る • グラフの実⾏行行単位をセッションという • 定数、変数、プレースホルダーを宣⾔言できる • 作ったグラフはデバイス(CPUやGPU)に展 開して実⾏行行する
• 分散処理理も可能である 12
TensorFlowのパラダイム • はじめにテンソルの演算グラフを作る • グラフの実⾏行行単位をセッションという • 定数、変数、プレースホルダーを宣⾔言できる • 作ったグラフはデバイス(CPUやGPU)に展 開して実⾏行行する
• 分散処理理も可能である ということを、Pythonをインターフェースとして ⾏行行っているフレームワーク 機械学習に関する便便利利なヘルパー関数がいっぱい あるのがポイント 13
ここだけ押さえればTensorFlowが 分かる簡単な例例 • 例例1:⾜足し算 – 演算(operation) • 例例2:カウントアップ – 変数(Variable)
• 例例3:⼊入⼒力力値をいろいろと変える – プレースホルダー(Placeholder) • 例例4:セッションを使う – セッション(Session) • 例例5:⾼高ランクなテンソルの演算 – テンソル(Tensor) 14
ここだけ押さえればTensorFlowが 分かる簡単な例例 • 例例1:⾜足し算 – 演算(operation) • 例例2:カウントアップ – 変数(Variable)
• 例例3:⼊入⼒力力値をいろいろと変える – プレースホルダー(Placeholder) • 例例4:セッションを使う – セッション(Session) • 例例5:⾼高ランクなテンソルの演算 – テンソル(Tensor) 15
1+2 = 3の⾜足し算 16
演算(Operation) x(定数) y(定数) + 演算がグラフのノードとなる(この場合は加算の演算) tf.add() tf.constant() tf.constant() 17
演算(Operation) x(定数) y(定数) + 演算がグラフのノードとなる(この場合は加算の演算) tf.add() tf.constant() tf.constant() 1 2
3 18
ここだけ押さえればTensorFlowが 分かる簡単な例例 • 例例1:⾜足し算 – 演算(operation) • 例例2:カウントアップ – 変数(Variable)
• 例例3:⼊入⼒力力値をいろいろと変える – プレースホルダー(Placeholder) • 例例4:セッションを使う – セッション(Session) • 例例5:⾼高ランクなテンソルの演算 – テンソル(Tensor) 19
カウントアップ 20
変数(Variable) inc(定数) + cnt(変数) 通常のプログラミング⾔言語の変数などと同じように 代⼊入可能な箱として変数がある tf.assign() tf.Variable() tf.constant() tf.add()
1 0 21
変数(Variable) inc(定数) + cnt(変数) tf.assign() tf.Variable() tf.constant() tf.add() 1 0
1 通常のプログラミング⾔言語の変数などと同じように 代⼊入可能な箱として変数がある 22
変数(Variable) inc(定数) + cnt(変数) tf.assign() tf.Variable() tf.constant() tf.add() 1 1
2 通常のプログラミング⾔言語の変数などと同じように 代⼊入可能な箱として変数がある 23
変数(Variable) inc(定数) + cnt(変数) tf.assign() tf.Variable() tf.constant() tf.add() 1 2
3 通常のプログラミング⾔言語の変数などと同じように 代⼊入可能な箱として変数がある 24
ここだけ押さえればTensorFlowが 分かる簡単な例例 • 例例1:⾜足し算 – 演算(operation) • 例例2:カウントアップ – 変数(Variable)
• 例例3:⼊入⼒力力値をいろいろと変える – プレースホルダー(Placeholder) • 例例4:セッションを使う – セッション(Session) • 例例5:⾼高ランクなテンソルの演算 – テンソル(Tensor) 25
いろんな値を⼊入⼒力力する 26
プレースホルダー(Placeholder) y (プレースホルダ) x(定数) + tf.constant() tf.add() tf.placeholder() あらかじめ箱を作っておいて 実⾏行行時に好きな値を⼊入⼒力力させる
1 27
プレースホルダー(Placeholder) y (プレースホルダ) x(定数) + tf.constant() tf.add() tf.placeholder() feed_̲dict 1
1 2 あらかじめ箱を作っておいて 実⾏行行時に好きな値を⼊入⼒力力させる 28
プレースホルダー(Placeholder) y (プレースホルダ) x(定数) + tf.constant() tf.add() tf.placeholder() feed_̲dict 3
1 4 あらかじめ箱を作っておいて 実⾏行行時に好きな値を⼊入⼒力力させる 29
ここだけ押さえればTensorFlowが 分かる簡単な例例 • 例例1:⾜足し算 – 演算(operation) • 例例2:カウントアップ – 変数(Variable)
• 例例3:⼊入⼒力力値をいろいろと変える – プレースホルダー(Placeholder) • 例例4:セッションを使う – セッション(Session) • 例例5:⾼高ランクなテンソルの演算 – テンソル(Tensor) 30
実⾏行行環境を分ける 31
セッション 1(定数) + cnt(変数) tf.assign() tf.Variable() tf.constant() tf.add() 1(定数) +
cnt(変数) tf.assign() tf.Variable() tf.constant() tf.add() セッションにより グラフの実⾏行行環境が まるっと独⽴立立する 名前空間のようなもの tf.Session() tf.Session() 32
ここだけ押さえればTensorFlowが 分かる簡単な例例 • 例例1:⾜足し算 – 演算(operation) • 例例2:カウントアップ – 変数(Variable)
• 例例3:⼊入⼒力力値をいろいろと変える – プレースホルダー(Placeholder) • 例例4:セッションを使う – セッション(Session) • 例例5:⾼高ランクなテンソルの演算 – テンソル(Tensor) 33
テンソル(Tensor) のランクを⼤大きくする ここまでの話を 多次元の値に拡張 34
テンソル ランク どうなる 0 スカラ(要はただの数値) 1 ベクトル(配列列) 2 ⾏行行列列(2次元配列列) 3
3次元配列列(⾏行行列列に厚みがある感じ) n n次元配列列(イメージできない世界) 要は取り扱うデータ構造のことだと思ってください 今までの話はここ 35
多次元版の⾜足し算 36
⼊入⼒力力となるテンソルが違うだけ x(定数) y(定数) + 演算がグラフのノードとなる(この場合は加算の演算) tf.add() tf.constant() tf.constant() [[1,2], [1,2]]
[[3,4], [3,4]] [[4,6], [4,6]] 37
この先は? • ここまででTensorFlowの基礎中の基礎は 完了了となります • 残念念がら、機械学習や深層学習について は⾝身についたわけではありません • TensorFlow本家のチュートリアルなどで TensorFlow⾃自体、また深層学習の知識識を
深める必要があります
Thank You !! 39