tensorflow - aalto · tensorflow api tensorflow has apis available in several languages both for...

22
Tensorflow

Upload: others

Post on 20-May-2020

50 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Tensorflow

Page 2: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Does everything in one click!

Page 3: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Does everything in one click!

Machine learning (Neural nets, classification, regression, clusterization, cross-validation, batch-learning, gradient boosting, convex optimization etc.)

Page 4: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Does everything in one click!

Machine learning (Neural nets, classification, regression, clusterization, cross-validation, batch-learning, gradient boosting, convex optimization etc.)

Few lines of code! (High level intuitive python API)

Page 5: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Does Machine learning in few lines of code!

Page 6: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

What is Tensorflow?

An open-source software library for Machine Intelligence

Page 7: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Why is Tensorflow different?

TensorFlow™ is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them.

Page 8: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Companies using TensorFlow

Page 9: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Tensorflow API

TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most complete and the easiest to use, but other language APIs may be easier to integrate into projects and may offer some performance advantages in graph execution.

Python

C++

Java

Go

Page 10: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

TensorFlow API

TensorFlow provides multiple APIs.

The lowest level API - TensorFlow Core - provides you with complete programming control. We recommend TensorFlow Core for machine learning researchers and others who require fine levels of control over their models.

A high-level API like tf.contrib.learn helps you manage data sets, estimators, training and inference.

Page 11: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Why data flow graphs at all?

The flexible architecture allows you to deploy computation to one or more CPUs or GPUs in a desktop, server, or mobile device with a single API.

Page 12: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Tensorflow prerequisites

• How to program in Python

• At least a little bit of knowledge about arrays

• Ideally, something about machine learning

Page 14: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

tf.Graph

tf.Operation is a node, represents an operation.

Accepts a tf.Tensor and returns a tf.Tensor.

tf.Tensor is an edge, represents a piece of data of a specific array shape (scalar or 1D-array or matrix etc.).

Page 15: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Standard TensorFlow libraries

Math, Strings, Histograms, Control flow, Higher Order functions, TensorArray operations, Tensor Handle operations, Images, Sparse Tensors, Inputs and Readers, Data IO, Neural Networks, RNN, Training, Summary operations, Testing, BayesFlow, CRF, Statistical distributions, Random variable transformations, FFmpeg, Layers, Learn, Monitors, Losses, Metrics.

Page 16: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Small code example (convex problem)

Page 17: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Tensor board TensorBoard is a suite of web applications for inspecting and understanding your

TensorFlow runs and graphs.

It can output the graph of the calculation and draw a chart of summary values which

you log in the code.

Page 18: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

MNIST DEMO

Page 19: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

MNIST Linear Softmax model

Page 20: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

MNIST DEMO graph

Page 21: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

MNIST Convolutional NN example

Page 22: Tensorflow - Aalto · Tensorflow API TensorFlow has APIs available in several languages both for constructing and executing a TensorFlow graph. The Python API is at present the most

Conclusion

•High level and powerful machine learning library for Python with single API for CPU and GPU

•Requires a bit of getting familiar with the syntax, then you can easily create powerful and scalable machine learning models