List of articles

Getting started with TensorFlow

Intelligent robots, connected speakers, drones, medical imaging…

Artificial Intelligence is everywhere!

And algorithm implementation is a tedious task! 😱

It mainly relies on machine and deep learning techniques, based on complex mathematical foundations.

👍Thankfully, to allow practical access to these techniques, toolkits, in the form of Python libraries have been developed and made available to developers: Pytorch, Scikit Learn and TensorFlow …

👉In this article, we present two ways to install TensorFlow in an Anaconda environment.

 

What is TensorFlow ?

TensorFlow is a machine learning library.
It is a toolbox that can be used to solve extremely complex mathematical problems in an easy way.
TensorFlow gets its power from the large number of machine learning and deep learning models and algorithms. In particular, it allows to train and execute neural networks.

How to install TensorFlow on Anaconda ?

In the rest of this article, we assume that you have a minimal knowledge of the Anaconda environment.
If your Anaconda environment is not ready, you can download and install it from the following URL https://www.anaconda.com/products/distribution.
Once Anaconda is installed, you can proceed to the installation of TensorFlow.
Installation via the graphical interface

  1. Launch Anaconda from the Start menu
  2. The Anaconda home page is displayed

3. Choose the “Environment” section and select the “Not installed” option.».

4. A list of all libraries ready to be installed will be displayed. You can filter this list by typing the name (or part of the name) of the library you want to install in the search box. Check the tensorflow library (and any other desired library).

5. Click on the Apply button to start the installation. The duration will depend mainly on your bandwidth.

6. At the end of this step, tensorflow should appear in the list of installed libraries.

Install via CLI

The setup we have just presented is suitable for most of the needs of data scientists.
However, a major drawback of this method is that it depends on human-machine interaction and therefore it is neither automatable nor compatible with remote access (in textual server/client mode through SSH).
We therefore present a purely textual alternative for installing TensorFlow.

  1. Open “Anaconda prompt” from the start menu

  1. Run the pip install tensorflow command
  2. This command will download TensorFlow and all the libraries it depends on. At the end of this process a message will be displayed indicating the success or failure of the installation.

To verify the correct installation, write the following command lines to Anaconda Prompt.

Python
Import tensorflow as tf
msg = tf.constant(‘Hello, TensorFlow!’)
tf.print(msg)
If it says Hello, TensorFlow ! Congratulations, you have successfully installed TensorFlow.

  • To quit python on Anaconda prompt, type :
    quit()