Tensorflow Installation on Windows and Ubuntu

Nearly every process can be achieved using the Tensorflow platform. Its feature of being used on every device permits its users to create any kind of approach using TensorFlow. It is consistent with many languages such as JavaScript, Python, C#, Swift, and Ruby. This permits a user to operate in an atmosphere they are comfortable in.

TensorFlow also executes calculations faster than GPU and CPU. It is used in numerous disciplines such as picture recognition, voice detection, motion detection.

TensorFlow has one of the most comfortable installations, getting machine learning abilities squarely into the domain of everyday programmers. TensorFlow also delivers a reimagined approach and numerous user-friendly facilities to handle machine learning measures. Ultimately, TensorFlow has considerable and gathering support from Google.

The present decade is quite compelling for programmers due to which the development of large shared datasets, affordable GPUs have helped machine learning measures in recent years. Training data has become widely known and readily consumable in current years.

Installing TensorFlow

TensorFlow is one of the top frameworks for deep learning and machine learning. It conveniently delivers several sorts of installation and works on numerous operating systems. The basic structure is CPU-only, with more refined installations.

TensorFlow delivers numerous choices, which are as follows:

1. Python pip3 installation

2. Virtualenv

Here are the measures with a brief summary of the installation procedure.

Install TensorFlow on Windows:

Firstly you have to make sure that you have downloaded Python. If you have python installed in your system you can skip to the next step.

A 64-bit Python 3.5 version and above are the only versions that TensorFlow supports.

1. We need to download and install Python.

install python

2. Choose Add Python 3.x to Path.

add path

3. Select Install Now.

install now

4. Now a message appears as “Setup was successful.”

setup successful

5. Open Command Prompt and type python to check the version in order to confirm that the installation is successful.

As soon as you type in the command you can see the download starts and it will take a bit of time before the latest version of Tensorflow is installed.

command prompt

6. Testing

After successful installation from the above steps, it is necessary to check if the TensorFlow framework is working fine.

The following demonstration shows the same.

If it is working properly, you’re good to go now.
>>> python
>>>import tensorflow

testing

Install TensorFlow on Ubuntu

Before installing TensorFlow on Ubuntu, some requirements are needed. It is necessary to have an Ubuntu 16.04 server

  • 1GB of RAM
  • Firewall
  • Python 3.3 or a further version is needed.

Step 1: Install TensorFlow

Make a project-directory dr-tensorflow

$ mkdir ~/dr-tensorflow

Navigate to the newly created directory

$ cd ~/dr-tensorflow

While the environment is being started, with the given commands a new tensorflow-dev directory that includes the packages will be installed.
This command also includes a standalone version of Python and pip.

$source tensorflow-dev/bin/activate(tensorflow-dev)username@hostname:~/dr-tensorflow $

Now, the next step is to install TensorFlow in your virtual setting.
To install and upgrade TensorFlow’s most recent version in PyPi, execute the subsequent command.

(tensorflow-dev) $pip3 install –upgrade tensorflow

After successful installation, the output will be:

Collecting tensorflow 
Downloading tensorflow-1.5.0-cp37-cp37m-macosx_15_11_x86_64.whl (37.7MB) 100% |??????????????????????????????| 37.7MB 38kB/s
Successfully installed 

With this, the TensorFlow installation is achieved. Make certain that TensorFlow is working.

Summary

TensorFlow is one of the most used deep learning frameworks. In this article, we have understood the installation of TensorFlow in both Windows and Ubuntu. Now we can proceed to build projects in deep learning, CNN, RNN, etc. Make sure to check whether the TensorFlow library is imported before using the framework.