Recently, when I was attending AINL-ISMW FRUCT 2015 conference, I found out that Google open-sourced TensorFlow. That is cool, but may provoke some questions. Here, I try to answer some of them.

It is definitely not the same as, say, cloud-based machine-learning service (like, for example, Azure ML is).

It is a machine-learning library using data flow graphs to build models. The main purpose of the library is to create models to solve various NLP and image recognition tasks.

TensorFlow has been created for Deep Learning to let a user create a neural network architecture by himself (or herself, of course). Still, the library allows the user to work with statistical machine learning algorithms. However, it does not provide them out-of-the-box – user has to implement them on his own and TensorFlow provides only tools to do this.

Also, TensorFlow is a second generation machine learning system and it has been created to replace its predecessor called DistBelief.

In TensorFlow all the computations are represented as directed graphs, where the computations themselves (and input/output data as well) are nodes. The edges of the graph are paths, by which the data flows from node to node.

By the way, TensorFlow has its own visualization module called *TensorBoard*, which can visualize the created model in order to let a user trace the data flow in the model (Captain Obvious to rescue!).

Data in TensorFlow are represented as tensors (multidimensional and dynamically sized data arrays). Actually, tensors flow in the graph from node to node, thus making the name of the library sound logical. Simply speaking, a tensor is a 3D matrix (but it is not a strict mathematical definition, of course!). On a figure below, you may see a tensor in terms of vivisection. Comparing to matrix it has more degrees of freedom regarding data selection and slicing.

- Flexibility of representation – user can create almost any type of data flow graph, visualize and admire it. If you can express your algorithm as data flow graph, you can do it with TensorFlow – no exceptions.
- TensorFlow performs calculations both on CPU and GPU (if you have CUDA installed, of course) + it has support for parallel and asynchronous computations. Also, you can easily port your TensorFlow model to any other hardware, for example, from server to PC and from PC to laptop with no code changes. Perfect, isn’t it?
- You may use TensorFlow for both research and production purposes. Therefore, you can create some model for research and then push this very model into a product (after some code rewriting, of course, as researchers usually forget about code optimization) using the same TensorFlow library.
- Auto-differentiation. TensorFlow can automatically compute derivatives for you. It is very convenient if you love gradient-based machine learning algorithms like Stochastic Gradient Descent.
- Python interface! However, it has a poorly documented C++ interface as well, but it is poorly documented (Captain Obvious to rescue!). Go, Java, Lua, JavaScript, and R interfaces are coming soon.

It is Apache 2.0 – you may freely use TensorFlow for both research and commercial purposes. Truly nice.

Sure there are!

For example, try this tutorial from official website or explore these examples on GitHub.

Besides, you may taste a simplified TensorFlow interface for scikit-learn fans. It makes a transition form scikit-learn to TensorFlow much more comfortable.

Remember: to work with TensorFlow using Python you must have numpy and matplotlib installed. And, of course, you will need CUDA to perform calculations with GPU.

For some of you it may be interesting if there is any difference between TensorFlow and libraries like Theano, which also can make their own Deep Learning with multi-dimensional arrays and GPU.

Yes, TensorFlow may look like Theano, but:

- Tensor flow supports parallel computations, while Theano does not (and that is the main difference!)
- TensorFlow models are more flexible in terms of portability
- Someone (including me) may consider TensorFlow code structure more human-interpretable and easier to support
- TensorFlow is a C++ library with Python Interface, while Theano is a Python library with an ability to generate internal C or CUDA modules.

I hope this short overview will help you to understand or at least guesstimate what TensorFlow is, why it is cool and why you do or do not need it. Comments are welcome!

© 2019 Data Science Central ® Powered by

Badges | Report an Issue | Privacy Policy | Terms of Service

**Most Popular Content on DSC**

To not miss this type of content in the future, subscribe to our newsletter.

- Book: Statistics -- New Foundations, Toolbox, and Machine Learning Recipes
- Book: Classification and Regression In a Weekend - With Python
- Book: Applied Stochastic Processes
- Long-range Correlations in Time Series: Modeling, Testing, Case Study
- How to Automatically Determine the Number of Clusters in your Data
- New Machine Learning Cheat Sheet | Old one
- Confidence Intervals Without Pain - With Resampling
- Advanced Machine Learning with Basic Excel
- New Perspectives on Statistical Distributions and Deep Learning
- Fascinating New Results in the Theory of Randomness
- Fast Combinatorial Feature Selection

**Other popular resources**

- Comprehensive Repository of Data Science and ML Resources
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- 100 Data Science Interview Questions and Answers
- Cheat Sheets | Curated Articles | Search | Jobs | Courses
- Post a Blog | Forum Questions | Books | Salaries | News

**Archives:** 2008-2014 |
2015-2016 |
2017-2019 |
Book 1 |
Book 2 |
More

**Most popular articles**

- Free Book and Resources for DSC Members
- New Perspectives on Statistical Distributions and Deep Learning
- Time series, Growth Modeling and Data Science Wizardy
- Statistical Concepts Explained in Simple English
- Machine Learning Concepts Explained in One Picture
- Comprehensive Repository of Data Science and ML Resources
- Advanced Machine Learning with Basic Excel
- Difference between ML, Data Science, AI, Deep Learning, and Statistics
- Selected Business Analytics, Data Science and ML articles
- How to Automatically Determine the Number of Clusters in your Data
- Fascinating New Results in the Theory of Randomness
- Hire a Data Scientist | Search DSC | Find a Job
- Post a Blog | Forum Questions

## You need to be a member of Data Science Central to add comments!

Join Data Science Central