Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Getting Started with TensorFlow
Search
Rebecca Murphy
March 21, 2016
Programming
0
1.4k
Getting Started with TensorFlow
Rebecca Murphy
March 21, 2016
Tweet
Share
More Decks by Rebecca Murphy
See All by Rebecca Murphy
Refreerank
rebecca_roisin
0
120
pyFRET
rebecca_roisin
0
220
Other Decks in Programming
See All in Programming
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
130
ふつうの技術スタックでアート作品を作ってみる
akira888
1
840
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
550
Rails Frontend Evolution: It Was a Setup All Along
skryukov
0
140
AI時代のソフトウェア開発を考える(2025/07版) / Agentic Software Engineering Findy 2025-07 Edition
twada
PRO
86
29k
Deep Dive into ~/.claude/projects
hiragram
14
2.5k
Hypervel - A Coroutine Framework for Laravel Artisans
albertcht
1
120
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
2.1k
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
470
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
270
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
590
Discover Metal 4
rei315
2
130
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
95
6.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
Why Our Code Smells
bkeepers
PRO
336
57k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
4 Signs Your Business is Dying
shpigford
184
22k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Facilitating Awesome Meetings
lara
54
6.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
234
140k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Transcript
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?