cs20_1-2
1. Why Tensorflow
-
key idea:
-
For a framework to be useful in production:
it needs to be efficient, scalable, and maintainable.
-
For research:
the framework needs to have flexible operations that can be combined in novel ways.
Alternative frameworks are either flexible enough for research but less scalable, such as Chainer and PyTorch, or scalable but less flexible, such as Caffe and MXNet. TensorFlow is both flexible and scalable, allowing users to streamline from research into production.
-
-
summary:
- Python API
- Portability: deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API
- Flexibility: from Raspberry Pi, Android, Windows, iOS, Linux to server farms
- Visualization (TensorBoard is da bomb)
- Save and restore models, graphs
- Auto-differentiation autodiff (no more taking derivatives by hand. Yay)
- Large community (~300k commits, ~85k repositories)
- Awesome projects already using TensorFlow
2. Some cool projects using Tensorflow
- WaveNet: A Generative Model for Raw Audio (DeepMind, 2016)
- Dermatologist-level classification of skin cancer with deep neural networks (Esteva, Kuprel, et al., Nature 2017)
- Magenta(https://magenta.tensorflow.org/) (Google)
3. High level APIs on top of TensorFlow
-
But
However, the primary purpose of TensorFlow is not to provide out-of-the-box machine learning solutions. Instead, TensorFlow provides an extensive suite of functions and classes that allow users to define models from scratch. This is more complicated, but offers much more flexibility. You can build almost any architecture you can think of in TensorFlow.
4. Resources
We won’t be using any textbook for this class. The library is changing so fast that it’s hard for any book to keep up. We will be using mainly lecture notes and lecture slides. There are several resources that you might want to refer to become fluent in TensorFlow.
TensorFlow official sample models
StackOverflow should be your first port of call should you run into any problem with TensorFlow
There are also several introductory books on TensorFlow.
- Aurélien Géron’s Hands-On Machine Learning with Scikit-Learn and TensorFlow (O’Reilly, March 2017)
- François Chollet’s Deep Learning with Python (Manning Publications, November 2017)
- Nishant Shukla’s Machine Learning with TensorFlow (Manning Publications, January 2018)
- Lieder et al.’s Learning TensorFlow A Guide to Building Deep Learning Systems (O’Reilly, August 2017)
5. TensorFlow Basics
The first thing we need to understand about TensorFlow is its computation graph approach. Any TensorFlow program consists of two phases:
Phase 1: assemble a graph
Phase 2: use a session to execute operations in the graph.
Note that this might change in the future with TensorFlow’s eager mode, currently experimental.