Introduction to TensorFlow
Lecture note 1: Introduction to TensorFlow
Why TensorFlow
TensorFlow was originally created by researchers at Google as a single infrastructure for machine learning in both production and research. Later, an implementation of it was open sourced under the Apache 2.0 License in November 2015. On the Tensorflow website, we see:
"TensorFlow™ is an open source software library for
numerical computation using data flow graphs."
Note that only the implementation of TensorFlow that we see on GitHub is open-source. Google maintains its own internal version. It's said that Google did it because of the complicated relationships TensorFlow has with its other internal tools, not because Google is "hoarding good stuff". For the rest of this course, when we say TensorFlow, we are referring to the open source implementation.
The next key phrase we see is that TensorFlow is a "software library for Machine Intelligence". In the past year, it seems like every week, a company or another released their own deep learning library. For a non-exhaustive list of current deep learning libraries, please visit this link.
Given the plethora of these libraries, why did we choose Tensorflow to teach in this class? 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.
This unique position allowed TensorFlow to grow quickly. It's currently being used by big companies such as Google, OpenAI, NVIDIA, Intel, SAP, eBay, Airbus, Uber, Airbnb, Snap, Dropbox and startups alike. By the number of stars and related repositories on GitHub as of Jan 11, 2018, TensorFlow is by far the most popular machine learning library with more than 85.4k stars and 25.3k related repositories, twice as much as the total stars and related repositories of Caffe, PyTorch, Torch, and Theano combined. It's said that the rise of TensorFlow is the reason why the support for Theano was discontinued in September 2017.
Demand for TensorFlow learning materials also surpasses that of any other framework.
In summary, we chose TensorFlow because:
- 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
Some cool projects using Tensorflow
1. WaveNet: A Generative Model for Raw Audio (DeepMind, 2016)
2. Dermatologist-level classification of skin cancer with deep neural networks (Esteva, Kuprel, et al., Nature 2017)
3. Magenta (Google)
Use machine learning to create compelling art and music. Their projects are really fun! For example, please check out Draw Together with a Neural Network.
Below are some more examples of real world projects using TensorFlow, according to Google Research Blog, 2016:
- Australian marine biologists are using TensorFlow to find sea cows in tens of thousands of hi-res photos to better understand their populations, which are under threat of extinction.
- An enterprising Japanese cucumber farmer trained a model with TensorFlow to sort cucumbers by size, shape, and other characteristics.
- Radiologists have adapted TensorFlow to identify signs of Parkinson's disease in medical scans.
- Data scientists in the Bay Area have rigged up TensorFlow and the Raspberry Pi to keep track of the Caltrain.
I hope that after this class, you'd be able to use TensorFlow to work on super cool projects like that!
High level APIs on top of TensorFlow
There are many high level APIs built on top of TensorFlow. Some of the most popular APIs included Keras, TFLearn, and Sonnet. These high-level APIs allow for faster experimentation -- you can call a complex neural network models in a few lines of code. The APIs have attracted a sizeable number of users. You should definitely check them out, and we might briefly go over these high-level APIs in class if time permits.
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.
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.
TensorFlowofficial 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)
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.
It's best to explain this with graphs. Please refer to 4)to learn about TensorFlow's computation graph approach, tensors, subgraphs, and sessions.
Introduction to TensorFlow的更多相关文章
- [TensorFlow] Introduction to TensorFlow Datasets and Estimators
Datasets and Estimators are two key TensorFlow features you should use: Datasets: The best practice ...
- 吴恩达课后习题第二课第三周:TensorFlow Introduction
目录 第二课第三周:TensorFlow Introduction Introduction to TensorFlow 1 - Packages 1.1 - Checking TensorFlow ...
- 谷歌发布 TensorFlow Lite [官方网站,文档]
机器学习社区:http://tensorflow123.com/ 简介 TensorFlow Lite TensorFlow Lite 是 TensorFlow 针对移动和嵌入式设备的轻量级解决方案. ...
- TensorFlow 中文资源全集,官方网站,安装教程,入门教程,实战项目,学习路径。
Awesome-TensorFlow-Chinese TensorFlow 中文资源全集,学习路径推荐: 官方网站,初步了解. 安装教程,安装之后跑起来. 入门教程,简单的模型学习和运行. 实战项目, ...
- TensorFlow tutorial
代码示例来自https://github.com/aymericdamien/TensorFlow-Examples tensorflow先定义运算图,在run的时候才会进行真正的运算. run之前需 ...
- 5个最好的TensorFlow网络课程
1. Introduction to TensorFlow for Artificial Intelligence, Machine Learning and Deep Learning This c ...
- (zhuan) Building Convolutional Neural Networks with Tensorflow
Ahmet Taspinar Home About Contact Building Convolutional Neural Networks with Tensorflow Posted on a ...
- TensorFlow数据读取方式:Dataset API
英文详细版参考:https://www.cnblogs.com/jins-note/p/10243716.html Dataset API是TensorFlow 1.3版本中引入的一个新的模块,主要服 ...
- Awesome TensorFlow
Awesome TensorFlow A curated list of awesome TensorFlow experiments, libraries, and projects. Inspi ...
随机推荐
- bzoj 1571: [Usaco2009 Open]滑雪课Ski【dp】
参考:https://blog.csdn.net/cgh_andy/article/details/52506738 没有get到什么重点的dp--做的莫名其妙 注意滑雪一个坡可以滑很多次 设f[i] ...
- [App Store Connect帮助]六、测试 Beta 版本(4.1) 管理 Beta 版构建版本:为构建版本添加测试员
在“TestFlight”部分中,您可以查看您所有 App 版本的构建版本,并深入查看构建版本的详细信息.您也可以为某个构建版本添加群组或独立测试员. 必要职能:“帐户持有人”职能.“管理”职能或“A ...
- Linux学习笔记之Linux用户与用户组、文件操作命令、文件权限剖析
1.用户与用户组 Linux是一个多用户操作系统,通过用户与用户组的概念,可以实现保证安全性和隐私性.任何一个文件都具有User.Group.Others三个权限. 文件拥有者(Linux下所有的东西 ...
- PROTEUS快捷键与部分知识点
缩放 有以下几种方法对原理图进行缩放: 移动鼠标需要所放的地方,滚动鼠标滑轮进行缩放. 移动师表需要缩放的地方,按键盘F6放大,F7缩小 按下ShIFT键,鼠标左键拖拽出需要放大的区域,这叫SHIFT ...
- Q - Euclid in Manhattan(欧几里德距离==曼哈顿距离?)
Desciption Consider a set of n points in a 2-D plane with integer coordinates. There are various way ...
- kafka_2.11-0.8.2.2.tgz的3节点集群的下载、安装和配置(图文详解)
kafka_2.10-0.8.1.1.tgz的1或3节点集群的下载.安装和配置(图文详细教程)绝对干货 一.安装前准备 1.1 示例机器 二. JDK7 安装 1.1 下载地址 下载地址: http: ...
- Android4.4以上Uri转换成绝对路径的工具类
一.Android4.4版本以上Uri地址封装规范: content://com.android.providers.media.documents/document/image%3A659 二.An ...
- 总结MySQL中SQL语法的使用
--where子句操作符: where子句操作符 = 等于 <> 不等于(标准语法) != 不等于(非标准语法,可移植性差) < 小于 <= 小于等于 > 大于 > ...
- 专题六:UDP编程
引用: 前一个专题简单介绍了TCP编程的一些知识,UDP与TCP地位相当的另一个传输层协议,它也是当下流行的很多主流网络应用(例如QQ.MSN和Skype等一些即时通信软件传输层都是应用UDP协议的) ...
- Java 基础入门随笔(11) JavaSE版——继承、覆盖、抽象类
1.面向对象的特征二:继承 定义: 指一个对象直接使用另一对象的属性和方法. 继承好处: 1.提供代码的复用性. 2.让类与类直接产生了关系,给第三个特征多态提供了前提. java中支持单继承.不直接 ...