This document provides an overview of Machine Learning with TensorFlow 101. It introduces TensorFlow, describing its programming model and how it uses computational graphs for distributed execution. It then gives a simplified view of machine learning, and provides examples of linear regression and deep learning with TensorFlow. The presenter is an entrepreneur who has been dabbling with machine learning for the past 3 years using tools like Spark, H2O.ai and TensorFlow.
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
TensorFlow 101
1. Machine Learning with TensorFlow 101
North Atlanta Machine Learning Meetup
April 25, 2017
2. Outline
• Tensorflow
– Overview
– Tensorflow Programming Model
• Simplified View of Machine Learning
• Linear Regression in Tensorflow
• Deep Learning with Tensorflow
3. About me
About me
• Entrepreneur
• MLATL meetup
• Fintech, Supply Chain,
Healthcare
• Dabbling with ML for the
past 3 years with Spark,
H20.ai and Tensorflow
• Love coding, traveling
About
• Bridging gap between
research and industry
• Tailored Analytics/ML
solutions
– Deep Learning / ML / AI
– Custom Data Applications
– Architecture/Strategy
• Training
• Started as Machine
Learning based Customer
Engagement platform for
banks
4. Before getting started
• Install Docker for your platform
• Install TensorFlow 0.11
• Don’t want to write code?
– Welcome to simply observe as well
docker run –it –p 8888:8888 –p 6006:6006 gcr.io/tensorflow/tensorflow
6. TensorFlow - Genesis
• Pre-TF – (Math libaries without distribution)
– Matlab
– SciPy
– Octave
• Computational Graph, Automatic Differentiation
– Theano
– Torch
– DL4J
• On comes TensorFlow
– Distributed, GPU-support
– MxNet also has similar capabilities
– Keras is a higher level DL framework that can plug into TF or Theano (now almost every other DL framework)
• Popular non-differentiating approaches
– Spark, Flink
– H2O.ai
7. TensorFlow is not a panacea
• Actively evolving – current version is 0.11. Although used heavily within
Google. But it has excellent community support
• Over 600 operations. Programming model not very elegant
• Sometimes it can get cumbersome
– MatLab:
– TensorFlow:
• Mostly designed well, but you can see evidence of flaws
• Highly optimized for a specific class of problems
• Aggregations are limited. No custom aggregations
What’s that got to do with a while loop??
9. Graphs
• Nodes can be
– Data nodes
– Operations
– Summaries
• Edges show the computation flow
• Data nodes can be,
– Variables
– Constants
– Placeholders
Source: TensorFlow Paper, Google Research
12. Partial Execution
• After defining the
computational graph we
can turn evaluate some
parts
• Partial update is not
necessarily incremental
update
• Incremental update is
possible but hard to
debug
Source: TensorFlow Paper, Google Research