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
Getting Started with TensorFlow
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Rebecca Murphy
March 21, 2016
Programming
1.7k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Getting Started with TensorFlow
Rebecca Murphy
March 21, 2016
Transcript
39 slides
TensorFlow Tutorial Rebecca Murphy
[email protected]
@rebecca_roisin TensorFlow Meetup Monday 21st
March 2016
Talk Overview • TensorFlow overview • Programming Model • Mechanics
of TensorFlow • Installation • Model Definition • Fitting • Checkpointing • TensorBoard visualisations • Why TensorFlow?
TensorFlow: Overview
What Is TensorFlow? • Google’s 2nd generation deep learning library
• Simple API (Python, C++) for: • Describing Machine Learning models • Implementing Machine Learning algorithms
What Can We Do With TensorFlow? • Regression models •
Neural networks • Deep learning: • Distributed representations • Convolutional Networks • Recurrent Neural Networks • LSTM Neural Networks
TensorFlow: Programming Model
TensorFlow: What Is a Tensor? • Tensor: n-dimensional array •
Scalar: 0D Tensor • Vector: 1D Tensor • Matrix: 2D Tensor • Typed: • Int, double, complex, string
Tensor Flows • Tensor Flow computations: stateful dataflow graphs •
Deep learning model = Directed graph • Node: (mathematical) operation • Edge: • Control dependencies • Data flow • Describe graph -> initialize -> execute (parts of ) graph
TensorFlow: Mechanics
Installing TensorFlow • Python API • Python 2.7 • Python
3.3+ • Setup instructions • pip install: • pip install --upgrade https://storage.googleapis. com/tensorflow/mac/tensorflow-0.7.1-cp27-none-any.whl • Docker: • docker run -it b.gcr.io/tensorflow/tensorflow
Mechanics of Learning • Define model • Load data •
Feed data • Make predictions • Evaluate • Visualise
Example Code • Try-tf github repositories • Associated blogpost •
Jason Baldridge @jasonbaldridge
Let’s get Started
Defining the Model
Model Definition: Key Features (1) • Tensor shapes are pre-defined:
• Tensors support mathematical manipulation • Operations are nodes in the model graph
Model Definition: Key Features (2) • Built-in functions for common
Deep Learning operations: • See Neural Network API for more • Gradient descent optimisation: • Variables store current state of model
Training the Model: Loading Data (1) • Load data into
variables • Need to write custom functions to parse data
Training the Model: Loading Data (2)
Training the Model: Sessions • Model graph describes computations •
Computations evaluated within a session: • Places graph onto CPU / GPU • Supplies methods to evaluate graph operations
The Feed Dict: Training the Model • Predefined placeholder tensors
• Feed-dict supplies batch of data
Training the Model: Evaluation • Pre-defined evaluation nodes compare predicted
and true labels: • Evaluate accuracy function within a session:
Checkpoints: Saving Models • Saver class allows model state to
be stored and reloaded • Use checkpoints to periodically save the state of the model
• Saver class allows model state to be stored and
reloaded • Restore a previously trained model Checkpoints: Loading Saved Models
Flags: Controlling Training • tf.app.flags: set command-line arguments • Wraps
python gflags • tf.app.run() parses flags before calling main()
TensorBoard: Visualising Learning
TensorBoard: Basics • TensorFlow visualisation tool • View • Graph
models • Training behaviour • Simple modifications to model code • Browser-based tool
TensorBoard: Annotations
TensorBoard: Scopes
TensorBoard: Saving Output • Set up summary and writer objects
• Periodically run evaluation and store output: • tensorboard --logdir=try_tf_logs/
TensorBoard: Model Visualisation (1)
TensorBoard: Model Visualisation (2)
TensorBoard: Training Visualisation (1)
TensorBoard: Training Visualisation (2)
TensorFlow: Where Next?
Why Use TensorFlow: Great Examples • TensorFlow Tutorials • Handwriting
generation from @hardmaru • Next letter prediction from @karpathy
Why Use TensorFlow: Active Community
TensorFlow: Future Developments • Improved memory usage in gradient calculations
• JIT Compilation • Improved node execution scheduling • Support for parallelisation across many machines • Support for more languages (Java, Lua, Go, R …) • Source: TensorFlow Whitepaper
Thank You!
Questions?
More Decks by Rebecca Murphy
See All by Rebecca Murphy
Refreerank
rebecca_roisin
0
130
pyFRET
rebecca_roisin
0
230
Other Decks in Programming
See All in Programming
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
200
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
9.3k
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
380
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
320
あなたはMCPの機能を、まだ知らない。
4geru
1
520
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
130
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
680
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.3k
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
480
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
290
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6k
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
990
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
How to build a perfect <img>
jonoalderson
1
6.2k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
330
It's Worth the Effort
3n
188
29k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Building AI with AI
inesmontani
PRO
1
1.4k