TensorFlow 2.0
AutoGraph
This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited.
Source: TensorFlow Documentation
Dataflow Computation Graphs
• TensorFlow implements dataflow, which is a common programming
model for parallel computing.
• In a dataflow graph, the nodes represent units of computation, and
the edges represent the data consumed or produced by a
computation.
• TensorFlow uses a dataflow graph to represent your computation in
terms of the dependencies between individual operations.
• This leads to a low-level programming model in which you first define
the dataflow graph, then create a TensorFlow session to run parts of
the graph across a set of local and remote devices.
This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited.
Source: TensorFlow Documentation
Advantages of using TensorFlow graphs
• Simple deployment to a platform independent server.
• Automatic distribution and replication (placing nodes on the
distributed system).
• Graph-based optimizations
• common subexpression elimination
• constant-folding
• …
• Compilation and kernel fusion.
This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited.
Source: TensorFlow Documentation
Disadvantages of Graph Specification
• Structure of code is unnatural and does not use Python data
structures.
• Graph control flow must be used rather than Python control flow and
this complicates the specification of dynamic models.
• Standard Python debugging tools cannot be used for immediate error
reporting.
• Not possible to quickly iterate on small code changes and minor
reconfigurations.
This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited.
Source: TensorFlow Documentation
Eager Execution
• TensorFlow's eager execution is an imperative programming
environment that evaluates operations immediately.
• It does not build graphs so operations return concrete values instead
of constructing a computational graph to run later.
• tf.Tensor objects reference concrete values instead of symbolic handles to
nodes in a computational graph.
• Since there isn't a computational graph to build and run later in a
session, it's easy to inspect results using print() or a debugger.
• This makes it easy to get started with TensorFlow and debug models,
and it reduces boilerplate as well.
This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited.
Source: TensorFlow Documentation
Best Practice
• It's best to write code for both eager execution and graph execution.
• This gives you
• eager's interactive experimentation and debuggability
• distributed performance benefits of graph execution
• You should
• write, debug, and iterate in eager execution
• then import the model graph for production deployment
This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited.
Source: TensorFlow Documentation
AutoGraph: Easy control flow for graphs
• AutoGraph helps you write complicated graph code using normal
Python.
• Behind the scenes, AutoGraph automatically transforms your code
into the equivalent TensorFlow graph code.
• Equivalent graph code means code that generates a TensorFlow graph
when run.
• The generated graph has the same effects as the original code when
executed (for example with tf.function or tf.compat.v1.Session.run).
• In other words, using AutoGraph can be thought of as running Python
in TensorFlow.
This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited.
Source: TensorFlow Documentation
TensorFlow AutoGraph Capabilities and Limitations
• TF AutoGraph converts Eager Python code into TensorFlow graph-
mode code.
• For example, users write code with if and while and AutoGraph
automatically converts it into the equivalent tf.cond, and
tf.while_loop.
• Python is a large language, so hoping to convert arbitrary Python
code directly to TF graphs is overly ambitious.
• However, the Python code written to metaprogram TF graphs is in
practice a restricted subset.
• TensorFlow aims to support as much of this subset as possible.
This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited.
Source: TensorFlow Documentation
Already
Supported Now
This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited.
Source: TensorFlow Documentation
Not or Partially
Supported Now

More Related Content

PDF
microC-DAQ
PPTX
Touchless writer
PPTX
Avi Pfeffer, Principal Scientist, Charles River Analytics at MLconf SEA - 5/2...
PPTX
Multi layered perceptron (mlp)
PPTX
Analytics tools and Instruments
PDF
Rajat Monga, Engineering Director, TensorFlow, Google at MLconf 2016
PPTX
Text to speech conversation in gujarati
PPT
Cupdf.com introduction to-data-structures-and-algorithm
microC-DAQ
Touchless writer
Avi Pfeffer, Principal Scientist, Charles River Analytics at MLconf SEA - 5/2...
Multi layered perceptron (mlp)
Analytics tools and Instruments
Rajat Monga, Engineering Director, TensorFlow, Google at MLconf 2016
Text to speech conversation in gujarati
Cupdf.com introduction to-data-structures-and-algorithm

What's hot (20)

PPTX
Tensor flow
ODP
Parallel Programming on the ANDC cluster
PDF
Introduction to TensorFlow Lite
PPTX
Functional programming ideas in python
PPTX
Tensorflow windows installation
PDF
Parallel Computing - Lec 5
PPTX
Neural networks and google tensor flow
PDF
PDF
Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...
PDF
Introduction to Tensor Flow for Optical Character Recognition (OCR)
PPTX
Algorithms 101 for Data Scientists (Part 2)
PDF
Tensorflowv5.0
PDF
TENSORFLOW: ARCHITECTURE AND USE CASE - NASA SPACE APPS CHALLENGE by Gema Par...
PPT
Introduction to data structures and Algorithm
PPTX
Task and Data Parallelism: Real-World Examples
PDF
Teaching Recurrent Neural Networks using Tensorflow (May 2016)
PPTX
Dot net parallelism and multicore computing
PPTX
Data Structures - Lecture 1 [introduction]
PDF
Mikio Braun – Data flow vs. procedural programming
PPTX
Matlab for Electrical Engineers
Tensor flow
Parallel Programming on the ANDC cluster
Introduction to TensorFlow Lite
Functional programming ideas in python
Tensorflow windows installation
Parallel Computing - Lec 5
Neural networks and google tensor flow
Andrew Musselman, Committer and PMC Member, Apache Mahout, at MLconf Seattle ...
Introduction to Tensor Flow for Optical Character Recognition (OCR)
Algorithms 101 for Data Scientists (Part 2)
Tensorflowv5.0
TENSORFLOW: ARCHITECTURE AND USE CASE - NASA SPACE APPS CHALLENGE by Gema Par...
Introduction to data structures and Algorithm
Task and Data Parallelism: Real-World Examples
Teaching Recurrent Neural Networks using Tensorflow (May 2016)
Dot net parallelism and multicore computing
Data Structures - Lecture 1 [introduction]
Mikio Braun – Data flow vs. procedural programming
Matlab for Electrical Engineers
Ad

Similar to TensorFlow 2.0 Autographs - For TFUG - Vik Pant (20)

PPTX
Introduction to Tensor Flow-v1.pptx
PDF
Tensorflow - Overview, Features And Advantages.pdf
PDF
Tensor flow intro and summit info feb 2017
PPTX
Coding For Cores - C# Way
PDF
A Sneak Peek of MLIR in TensorFlow
PDF
Multicore_Architecture Book.pdf
PPTX
Neural Networks with Google TensorFlow
PPTX
TensorFlow Technology
PDF
Introduction to TensorFlow
PPTX
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
PPTX
Deep dive time series anomaly detection with different Azure Data Services
PDF
Intro to Telegraf
PDF
INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...
PPTX
Deep Dive Time Series Anomaly Detection in Azure with dotnet
PPTX
Lecture Note DL&NN Tensorflow.pptx
PDF
TensorFlow 101
PDF
running Tensorflow in Production
PDF
Tensorflow on Android
PDF
TFLite NNAPI and GPU Delegates
PPTX
TensorFlow.pptx
Introduction to Tensor Flow-v1.pptx
Tensorflow - Overview, Features And Advantages.pdf
Tensor flow intro and summit info feb 2017
Coding For Cores - C# Way
A Sneak Peek of MLIR in TensorFlow
Multicore_Architecture Book.pdf
Neural Networks with Google TensorFlow
TensorFlow Technology
Introduction to TensorFlow
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
Deep dive time series anomaly detection with different Azure Data Services
Intro to Telegraf
INTERFACE by apidays 2023 - Data Collection Basics, Anais Dotis-Georgiou, Inf...
Deep Dive Time Series Anomaly Detection in Azure with dotnet
Lecture Note DL&NN Tensorflow.pptx
TensorFlow 101
running Tensorflow in Production
Tensorflow on Android
TFLite NNAPI and GPU Delegates
TensorFlow.pptx
Ad

More from Devatanu Banerjee (7)

PPTX
TensorFlow 2.0 Overview - For TensorFlow User Group - Ehsan Amjadian
PPTX
Font classification with 5 deep learning models using tensor flow
PPTX
Application of NLG in e commerce
PDF
Dave D'Silva - Emerging Technology Framework to Unite Society
PPTX
Sandeep Chaudhury - AI & Prosperity
PPTX
Tensorflow User Group Toronto - Ehsan Amjadian - TF Gager
PPTX
Monitoring Trends (Seminar Slides)
TensorFlow 2.0 Overview - For TensorFlow User Group - Ehsan Amjadian
Font classification with 5 deep learning models using tensor flow
Application of NLG in e commerce
Dave D'Silva - Emerging Technology Framework to Unite Society
Sandeep Chaudhury - AI & Prosperity
Tensorflow User Group Toronto - Ehsan Amjadian - TF Gager
Monitoring Trends (Seminar Slides)

Recently uploaded (20)

PDF
Grey Minimalist Professional Project Presentation (1).pdf
PPTX
inbound2857676998455010149.pptxmmmmmmmmm
PDF
A biomechanical Functional analysis of the masitary muscles in man
PPTX
Introduction to Fundamentals of Data Security
PPTX
Stats annual compiled ipd opd ot br 2024
PPT
PROJECT CYCLE MANAGEMENT FRAMEWORK (PCM).ppt
PDF
Concepts of Database Management, 10th Edition by Lisa Friedrichsen Test Bank.pdf
PPTX
cp-and-safeguarding-training-2018-2019-mmfv2-230818062456-767bc1a7.pptx
PPT
Classification methods in data analytics.ppt
PPTX
PPT for Diseases (1)-2, types of diseases.pptx
PPTX
recommendation Project PPT with details attached
PPTX
1 hour to get there before the game is done so you don’t need a car seat for ...
PPTX
AI AND ML PROPOSAL PRESENTATION MUST.pptx
PPTX
PPT for Diseases.pptx, there are 3 types of diseases
PDF
©️ 02_SKU Automatic SW Robotics for Microsoft PC.pdf
PPTX
OJT-Narrative-Presentation-Entrep-group.pptx_20250808_102837_0000.pptx
PPTX
DATA ANALYTICS COURSE IN PITAMPURA.pptx
PDF
The Role of Pathology AI in Translational Cancer Research and Education
PPTX
Hushh Hackathon for IIT Bombay: Create your very own Agents
PPT
expt-design-lecture-12 hghhgfggjhjd (1).ppt
Grey Minimalist Professional Project Presentation (1).pdf
inbound2857676998455010149.pptxmmmmmmmmm
A biomechanical Functional analysis of the masitary muscles in man
Introduction to Fundamentals of Data Security
Stats annual compiled ipd opd ot br 2024
PROJECT CYCLE MANAGEMENT FRAMEWORK (PCM).ppt
Concepts of Database Management, 10th Edition by Lisa Friedrichsen Test Bank.pdf
cp-and-safeguarding-training-2018-2019-mmfv2-230818062456-767bc1a7.pptx
Classification methods in data analytics.ppt
PPT for Diseases (1)-2, types of diseases.pptx
recommendation Project PPT with details attached
1 hour to get there before the game is done so you don’t need a car seat for ...
AI AND ML PROPOSAL PRESENTATION MUST.pptx
PPT for Diseases.pptx, there are 3 types of diseases
©️ 02_SKU Automatic SW Robotics for Microsoft PC.pdf
OJT-Narrative-Presentation-Entrep-group.pptx_20250808_102837_0000.pptx
DATA ANALYTICS COURSE IN PITAMPURA.pptx
The Role of Pathology AI in Translational Cancer Research and Education
Hushh Hackathon for IIT Bombay: Create your very own Agents
expt-design-lecture-12 hghhgfggjhjd (1).ppt

TensorFlow 2.0 Autographs - For TFUG - Vik Pant

  • 2. This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited. Source: TensorFlow Documentation Dataflow Computation Graphs • TensorFlow implements dataflow, which is a common programming model for parallel computing. • In a dataflow graph, the nodes represent units of computation, and the edges represent the data consumed or produced by a computation. • TensorFlow uses a dataflow graph to represent your computation in terms of the dependencies between individual operations. • This leads to a low-level programming model in which you first define the dataflow graph, then create a TensorFlow session to run parts of the graph across a set of local and remote devices.
  • 3. This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited. Source: TensorFlow Documentation Advantages of using TensorFlow graphs • Simple deployment to a platform independent server. • Automatic distribution and replication (placing nodes on the distributed system). • Graph-based optimizations • common subexpression elimination • constant-folding • … • Compilation and kernel fusion.
  • 4. This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited. Source: TensorFlow Documentation Disadvantages of Graph Specification • Structure of code is unnatural and does not use Python data structures. • Graph control flow must be used rather than Python control flow and this complicates the specification of dynamic models. • Standard Python debugging tools cannot be used for immediate error reporting. • Not possible to quickly iterate on small code changes and minor reconfigurations.
  • 5. This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited. Source: TensorFlow Documentation Eager Execution • TensorFlow's eager execution is an imperative programming environment that evaluates operations immediately. • It does not build graphs so operations return concrete values instead of constructing a computational graph to run later. • tf.Tensor objects reference concrete values instead of symbolic handles to nodes in a computational graph. • Since there isn't a computational graph to build and run later in a session, it's easy to inspect results using print() or a debugger. • This makes it easy to get started with TensorFlow and debug models, and it reduces boilerplate as well.
  • 6. This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited. Source: TensorFlow Documentation Best Practice • It's best to write code for both eager execution and graph execution. • This gives you • eager's interactive experimentation and debuggability • distributed performance benefits of graph execution • You should • write, debug, and iterate in eager execution • then import the model graph for production deployment
  • 7. This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited. Source: TensorFlow Documentation AutoGraph: Easy control flow for graphs • AutoGraph helps you write complicated graph code using normal Python. • Behind the scenes, AutoGraph automatically transforms your code into the equivalent TensorFlow graph code. • Equivalent graph code means code that generates a TensorFlow graph when run. • The generated graph has the same effects as the original code when executed (for example with tf.function or tf.compat.v1.Session.run). • In other words, using AutoGraph can be thought of as running Python in TensorFlow.
  • 8. This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited. Source: TensorFlow Documentation TensorFlow AutoGraph Capabilities and Limitations • TF AutoGraph converts Eager Python code into TensorFlow graph- mode code. • For example, users write code with if and while and AutoGraph automatically converts it into the equivalent tf.cond, and tf.while_loop. • Python is a large language, so hoping to convert arbitrary Python code directly to TF graphs is overly ambitious. • However, the Python code written to metaprogram TF graphs is in practice a restricted subset. • TensorFlow aims to support as much of this subset as possible.
  • 9. This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited. Source: TensorFlow Documentation Already Supported Now
  • 10. This presentation may contain copyrighted materials that have been used under the fair use provisions of copyright laws. Further use, duplication, or distribution is prohibited. Source: TensorFlow Documentation Not or Partially Supported Now