In the year of 2015, TensorFlow was first introduced to the public. TensorFlow is Google’s artificial intelligence platform where developers can build robust AI applications. A research project at first turned into something larger and more valuable. Preliminary White Paper “TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems” describes all the details about this interface from its operations to programming model to execution and much more. Today we are going to reveal TensorFlow’s basic concept, its features, advantages and where it is used.
What is TensorFlow?
TensorFlow is an open source software library for numerical computation using data flow graphs. It was originally developed by researchers and engineers working on the Google Brain Team within Google’s Machine Intelligence research organization for the purposes of conducting machine learning and deep neural networks research, but the system is general enough to be applicable in a wide variety of other domains as well. Basically, it is a classifier that can look at an image and classify what is in the image. Other examples include speech recognition, Gmail, Google search and recommendations, and Google translate.
Companies that use TensorFlow are Airbnb, eBay, Dropbox, Intel, Google, Uber, Twitter and many more.
- Distribution out of the box
- Runs on CPU, GPU, TPU and mobile
- Fast and Flexible
- Easy to get started
The beauty of TensorFlow is that you don’t need to be knowledgeable about the advanced math models and optimization algorithms needed to implement deep neural networks. All you need is to download the sample code, read the tutorials and you can get started in no time.
It has been over a year since it has been opened and it has been cordially adopted by the developers throughout the world. TensorFlow has helped researchers, engineers, artists, students, and many others make progress with everything from language translation to early detection of skin cancer and preventing blindness in diabetics. The new version is faster and flexible. It includes new tf.keras module that provides full compatibility with Keras, another popular high-level neural networks library.
To understand why TensorFlow is so exciting and easy to use, let’s talk about “TensorFlow Playground”. TensorFlow Playground was designed as a tool to help you grasp the idea of neural networks without any hard math. Here you can play with a real neural network running in your browser and click buttons and tweak parameters to see how it works.
Neural network is a mechanism that’s implemented with basic math. Think of the computer as a child that you are teaching to identify images and numbers. Same with the computer, you train the system and it will make many mistakes before it becomes more sophisticated to start solving real-world problems.
It takes a lot of trial and error to get good results with many combinations of different network designs and algorithms. But in very near future, fully managed distributed training and prediction services such as Google Cloud Machine Learning with TensorFlow may open the power of large and deep neural networks to everyone.
How to Start
TensorFlow is providing a lot of tutorials explaining how to start. For developers new to TensorFlow, the high-level API is a good place to start. To learn about the high-level API, read guides here.
TensorFlow can be confusing in the beginning, so the founders created a utility to visualize different aspects of machine learning called TensorBoard. TensorBoard is used to visualize your TensorFlow graph, plot quantitative metrics about the execution of your graph, and show additional data like images that pass through it. When TensorBoard is fully configured, it looks like this:
TensorBoard has a built-in visualizer, called the Embedding Projector, for interactive visualization and analysis of high-dimensional data like embeddings. The embedding projector will read the embeddings from your model checkpoint file. Although it’s most useful for embeddings, it will load any 2D tensor, including your training weights. For more on TensorBoard: Embedding Visualization can be found here.
Next is TensorBoard: Graph Visualization. The graph visualization can help you understand and debug them. Here’s an example of the visualization at work.
On Monday, June 19th, 2017, TensorFlow announced a release of Tensor2Tensor. Tensor2Tensor or T2T is an open-source system for training deep learning models in TensorFlow. T2T facilitates the creation of state-of-the-art models for a wide variety of ML applications, such as translation, parsing, image captioning and more, enabling the exploration of various ideas much faster than previously possible.
The T2T library is built with familiar TensorFlow tools and defines multiple pieces needed in a deep learning system: data-sets, model architectures, optimizers, learning rate decay schemes, hyper parameters, and so on. Basically, you can pick any data-set, model, optimizer and set of hyper parameters, and run the training to check how it performs.
Machine Learning… Get inspired by examples
“ML is a secret sauce for the products of tomorrow. It no longer makes sense to have separate tools for researchers in ML and people who are developing real products.” – says Greg Corrado, a senior research scientist at Google. That’s why the idea was to create a one set of tools that researchers can use to try out their ideas and move them directly into products without having to rewrite the code.
Here are few examples of where TensorFlow has been used and how beneficial it has become.
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.
A sea cow getting caught in a fishing net, or losing its home to coastal development and it is very hard to keep track of them. To keep an accurate data on their population scientist are using drones to take pictures of the ocean. But how to quickly detect the sea cow on the image? Here is how TensorFlow came in handy. The system was able to detect sea cows in tens of thousands of images, which relieved scientists from doing a longer and much harder manual work
An enterprising Japanese cucumber farmer trained a model with TensorFlow to sort cucumbers by size, shape, and other characteristics.
The sorting work is not an easy task to learn and it takes months to learn the system. There are also some automatic sorters on the market, but they have limitations in terms of performance and cost, and small farms don’t tend to use them.
Using deep learning for image recognition allows a computer to learn from a training data set what the important “features” of the images are. By using a hierarchy of numerous artificial neurons, deep learning can automatically classify images with a high degree of accuracy. Thus, neural networks can recognize different species of cats, or models of cars or airplanes from images.
For this case the system uses Raspberry Pi 3 as the main controller to take images of the cucumbers with a camera, and in a first phase, runs a small-scale neural network on TensorFlow to detect whether or not the image is of a cucumber. It then forwards the image to a larger TensorFlow neural network running on a Linux server to perform a more detailed classification.
We’ve all used Airbnb. It is easy to use and it is so convenient. But did you know that Airbnb’s unique technological challenge is to personalize each match between guest and host?
Initially, search rankings were determined by a set of hard-coded rules based on very basic signals, such as the number of bedrooms and price. And because they were hard coded, the rules were applied to every guest uniformly, rather than taking into account the unique values that could create the kind of a personalized experience that keeps guests coming back.
Airbnb learned that machine learning could be used to offer this personalization. The company introduced its machine learning search ranking model toward the end of 2014 and has been continuously developing it since. Today Airbnb personalizes all search results.
The recommendations that Airbnb provides has expanded since then and things like décor in the house or setting is also taken into account. There are hundreds of signals that are pulled into the search rank model, which then the machine learning algorithm figures out how all the signals interact, to produce personalized search rankings.
Interested in starting TensorFlow on your own? Check out this tutorial where you will learn the basic building blocks. Here at VCG we do use TensorFlow. To find out how we can help you click Contact Us.