TensorFlow is machine learning open source framework designed by Google in November 2015, is used to simplify the development of deep neural networks.

TensorFlow is also an open source library and it licensed under the Apache. You can use it and modify it and you don’t need to pay any licensed fees it’s totally free. It is used to design, build, and train deep learning models.

Google Team, researchers and engineers from Google’s Machine Intelligence research organization was developed TensorFlow for the purposes of conducting machine learning and deep neural networks research. TensorFlow also help for engineers, artists, researchers, students, and many others, It help from language translation to early detection of skin cancer or even preventing blindness in diabetics for that matter.

TensorFlow updates

November 07, 2017 Tensorflow 1.4.0 Released
February 15, 2017 Announcing TensorFlow 1.0
September 09, 2016 Celebrating TensorFlow’s First Year
September 27, 2016 A Neural Network for Machine Translation, at Production Scale
August 31, 2016 Improving Inception and Image Classification in TensorFlow
August 30, 2016 TF-Slim: A high-level library for complex models in TensorFlow
August 24, 2016 Text summarization with TensorFlow
June 29, 2016 Wide & Deep Learning: Better Together with TensorFlow
June 27, 2016 TensorFlow v0.9 now available with improved mobile support
May 12, 2016 Announcing SyntaxNet: The World’s Most Accurate Parser Goes Open Source
April 29, 2016 DeepMind moves to TensorFlow
April 13, 2016 Announcing TensorFlow 0.8 – now with distributed computing support!

The New Version of TensorFlow 1.4.0 Released

Now Google announced the new version of TensorFlow 1.4.0 on 7th Nov 2017 with a great new additional feature. There have many releases in Tensorflow such as: Tensorflow 1.0, Tensorflow 1.2, Tensorflow 1.3

This new Version of Tensorflow 1.4.0 comes with some major features a few of which are mentioned below:

  • Keras:

Keras is now part of the core TensorFlow API include in tf.keras package. Keras is a deep learning library written in Python. Keras can be used with the Estimator API and other core TensorFlow functionality. Keras integrates smoothly with other TensorFlow APIs, including the Estimator API.

  • Datasets:

TensorFlow also support advanced feature, Dataset API included in a package tf.data. Dataset API support for Python generators. Google strongly recommended to use Dataset API to create input pipelines for TensorFlow models.

  • Estimators:

Estimator used to simplify machine learning programming. It is a high-level TensorFlow API. You can use pre-made estimator or can write your own estimator. you can also use them to create your own custom models.

Overview:

Google uses machine learning across a wide range of its products. In order to continually improve our models, it’s important that the training process be as fast as possible. We are happy our that developers are getting their hands on TensorFlow Lite. You can deploying machine learning applications on mobile and embedded devices using two ways they are: TensorFlow for Mobile and TensorFlow Lite.

TensorFlow for Mobile:  TensorFlow was designed to be a good learning solution for mobile platforms like Android and iOS. This will help you to understand how machine learning can work on mobile platforms and how to integrate TensorFlow into your mobile apps effectively.

TensorFlow Lite:  TensorFlow Lite is a best lightweight solution for mobile and embedded devices. It enables on-device machine learning inference with low latency and a small binary size. TensorFlow Lite has a new mobile-optimized interpreter, which has the major goals of keeping apps lean and fast.

Here are a few of the differences between TensorFlow for Mobile and TensorFlow Lite:

  • TensorFlow Lite is an evolution of TensorFlow Mobile. In most cases, apps developed with TensorFlow Lite will have a smaller binary size, fewer dependencies, and better performance.
  • TensorFlow Lite is an old, so not all use cases are covered yet. TensorFlow Mobile cover all production cases so we expect you to use TensorFlow Mobile.
  • TensorFlow Lite supports only a limited set of operators, so not all models will work on it by default. TensorFlow for Mobile has a fuller set of supported functionality.

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

The higher level APIs are built on top of TensorFlow Core. In addition, the higher level APIs make repetitive tasks easier and more consistent between different users and is easy to learn and use than TensorFlow core.

Advantages Using TensorFlow :

  1. Flexibility: TensorFlow is more flexible means you can use its part individually or can use all parts together.Such flexibility facilitates non-automatic migration to new models.
  2. Portability: without having any other hardware support TensorFlow made it easy to play around an idea on your laptop. It runs on GPUs, CPUs, desktops, servers, and mobile computing platforms.
  3. Auto Differentiation: It has automatic differentiation capabilities which benefit gradient based machine learning algorithms.
  4. Performance: TensorFlow allows you to make the most of your available hardware with its advanced support for threads, asynchronous computation, and queues. You can keep codes, notes, and visualization in a logically grouped and interactive style using TensorFlow iPython notebook.

Installing TensorFlow

Here I show you how to install a version of TensorFlow that enables you to write applications in Python: We’ve built and tested TensorFlow on the following 64-bit laptop/desktop operating systems:

  • MacOS X 10.11 (El Capitan) or later.
  • Ubuntu 14.04 or later
  • Windows 7 or later.

There are couple of ways to install TensorFlow

  • Pip install: Install TensorFlow on your machine, possibly upgrading previously installed Python packages. May impact existing Python programs on your machine.
  • Virtualenv install: Install TensorFlow in its own directory, not impacting any existing Python programs on your machine.
  • Anaconda install: If you are using Anaconda Python Distribution then you can Install TensorFlow in its own environment, it does not impact existing Python programs on your machine.
  • Docker install: Run TensorFlow in a Docker container isolated from all other programs on your machine.

Installing from sources: Install TensorFlow by building a pip wheel that you then install using pip.

TensorFlow Installation on Windows :

There is a different  of ways to install Tensorflow. But there are some problems: Tensorflow only works with Python 3.5.x on Windows. So if you use a Windows machine, I recommend that you to use Anaconda to manage Python versions.

Anaconda Installation on Windows :

First of all install anaconda into your machine. After installing Anaconda, it will provide you a customized command prompt (called Anaconda Prompt), where you can run Python shell easily.

anaconda_prompt

let’s get started. First of all, you have to create a Python 3.5 environment in to install Tensorflow:

>conda create -n tensorflow_windows python=3.5 anaconda

After creation of environment, activate it.

>activate tensorflow_windows
(tensorflow_windows)>

Next, we will install Tensorflow,

(tensorflow_windows)>pip install –ignore-installed –upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl

That’s it. Now you have Tensorflow installed on your machine and you can start your first Tensorflow-based project.

Pip Installation on Windows :

TensorFlow support  64-bit python 3.5 on windows.

To install the CPU-only version of TensorFlow, enter the following command at a command prompt:

C:\> pip install –upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl

To install the GPU version of TensorFlow, enter the following command at a command prompt:

C:\> pip install –upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.1-cp35-cp35m-win_amd64.whl

Installing TensorFlow in Ubuntu :

There are four mechanisms to install TensorFlow on Ubuntu

  1. Virtualenv
  2. Native pip
  3. Docker
  4. Anaconda

We recommend the virtualenv installation. Virtualenv provides a safe and reliable mechanism for installing and using TensorFlow. At the time of virtualenv installation, you have to install TensorFlow as well as all packages that are required for TensorFlow.  To start working with TensorFlow you have to activate virtual environment.

A. Installing TensorFlow with Virtualenv :

Following steps shows how to install TensorFlow with Virtualenv:

  1. Install pip and virtualenv by issuing one of the following commands:

$ sudo apt-get install python-pip python-dev python-virtualenv # for Python 2.7
$ sudo apt-get install python3-pip python3-dev python-virtualenv # for Python 3.n

  1. Create a virtualenv environment by issuing one of the following commands:

$ virtualenv –system-site-packages targetDirectory # for Python 2.7
$ virtualenv –system-site-packages -p python3 targetDirectory # for Python 3.n

  1. Activate the virtualenv environment by issuing one of the following commands:

$ source ~/tensorflow/bin/activate

$ source ~/tensorflow/bin/activate.csh  

  1. In last step we will install TensorFlow in the active virtuanenv, with different commands show for CPU, GPU and Python 3:

(tensorflow)$ pip install –upgrade tensorflow      # for Python 2.7
(tensorflow)$ pip3 install –upgrade tensorflow     # for Python 3.n
(tensorflow)$ pip install –upgrade tensorflow-gpu  # for Python 2.7 and GPU
(tensorflow)$ pip3 install –upgrade tensorflow-gpu # for Python 3.n and GPU

B. Installing TensorFlow with Native Pip :

You may install TensorFlow using Native Pip. To install TensorFlow you have to check system pre requirements that your system obtain python 2.7 or python 3.4+

After fulfill the prerequisites you are ready to install TensorFlow

Following are some simple steps to install TensorFlow :

First we will install TensorFlow using following commands

$ pip install tensorflow      # Python 2.7; CPU support (no GPU support)
$ pip3 install tensorflow     # Python 3.n; CPU support (no GPU support)
$ pip install tensorflow-gpu  # Python 2.7;  GPU support
$ pip3 install tensorflow-gpu # Python 3.n; GPU support

C. Installing TensorFlow with Docker :

Take the following steps to install TensorFlow through Docker:

  • First of all you need to install docker into your machine.
  • After that to install a version of TensorFlow that supports GPUs, you must install nvidia-docker.
  • Launch the docker container.

To launch Docker with CPU or GPU support the commands will be as following:

For CPU support only:

$ sudo docker run –it –p

For GPU support we will use the command:

$ sudo nvidia-docker run –it –p

D. Installing TensorFlow with Anaconda

following are the steps to install TensorFlow in an Anaconda environment:

  • First of all you have to download and install anaconda
  • Create conda environment using following command

$ conda create -n tensorflow python=2.7 # or python=3.3, etc.

  • After that activate the conda environment using the below command line:

$ source activate tensorflow
(tensorflow)$  # Your prompt should change

  • After activating conda environment, we will install TensorFlow inside our conda environment. Using following command

(tensorflow)$ pip install –ignore-installed –upgrade tfBinaryURL

where tfBinaryURL is the URL of the TensorFlow Python package.

Installing TensorFlow On Mac :

You can install TensorFlow using following mechanism

  • virtualenv
  • “native” pip
  • Docker

TensorFlow no longer provides GPU support on macOS. We recommend the virtualenv installation.

Installing TensorFlow with Virtualenv :

Take the following steps to install TensorFlow with Virtualenv:

  • Start a terminal (a shell).
  • Install pip and virtualenv using the following commands:

$ sudo easy_install pip
$ pip install –upgrade virtualenv

  • Create a virtualenv environment by using  a command

$ virtualenv –system-site-packages targetDirectory # for Python 2.7
$ virtualenv –system-site-packages -p python3 targetDirectory # for Python 3.n

where targetDirectory identifies the top of the virtualenv tree.

  • Activate the virtualenv environment by issuing one of the following commands:

$ source ~/tensorflow/bin/activate      # If using bash, sh, ksh, or zsh
$ source ~/tensorflow/bin/activate.csh  # If using csh or tcsh

Installing TensorFlow using Nativ Pip :

To install TensorFlow your system must installed python 2.7 or python 3.3+

  • Install TensorFlow by invoking one of the following commands:

$ pip install tensorflow      # Python 2.7; CPU support
$ pip3 install tensorflow     # Python 3.n; CPU support

Installing TensorFlow using Docker:

  • Install Docker on your machine
  • Launch a Docker container
  • To launch a Docker container that holds the TensorFlow binary image, enter a following command:

$ docker run -it -p hostPort:containerPort TensorFlowImage

Now you got the ideas about TensorFlow i.e. What is TensorFlow, It’s version, advantages, How to install in different operating systems etc..

Hope this article will help you!