install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

Hello Peeps! Welcome to the next lecture on deep learning, where we are discussing TensorFlow in detail. You have seen why we have chosen TensorFlow for this course, and we have read a lot about the working mechanism, programming languages, and advantages of using TensorFlow instead of other libraries. Instead of using the other options for the same purpose, we have seen several reasons to use TensorFlow. Because of the latest work on the library for more improvement and better results, it's now time to learn the specifics of TensorFlow installation. But before this, you have to check the list of the concepts that will be cleared today:

Is Installation of TensorFlow Difficult?

The simple and to-the-point answer to this question is, the installation is easy and usually does not require any practice. If you are new to the technical world or have not experienced the installation of any software, do not worry because we will not skip any steps. Moreover, we have chosen the perfect way to install TensorFlow by telling you the all necessary information about the installation process so you start only if all the parameters are completed. So, first of all, let us share the prerequisites with you. 

  • What are the minimum requirements for Tensorflow to be installed on your PC?

  • How can we choose the best method for the installation of TensorFlow?

  • How can we install TensorFlow with Jupyter?

  • What is the process for the Keras to be installed?

  • How can you launch the TensorFlow and Keras with the help of Jupyter Notebook?

  • What is the significance to use Jupyter, Keras, and TensorFlow?

Pre-requisites for TensorFlow

To install TensorFlow without difficulty, you must keep all types of requirements in mind. We have categorised each type of requirement and you just have to check whether you are ready to download it or not.

install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning


System Requirements

Ubuntu

16.04 or higher 

64 bits

macOS

10.12.6 (Sierra) or higher, GPU is not supported.

N/A

Window Native

Window 7 (higher is recommended)

64 bits

Window WSL 

Window 10

64 bits


 By the same token, there are some hardware requirements and below these values, the hardware does not support the TensorFlow.

install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning


Hardware Requirement

GPU

NVIDIA® GPU card with CUDA® architectures 3.5, 5.0, 6.0, 7.0, 7.5, 8.0

Here, it is important to notice that the requirements given in all the tables are the minimum requirement s and you can go for the higher versions of all of these for the better results and quality work.

install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning


Software Requirement

Python version

3.7-3.10

Pip version

19.0 (for window and Linux),  20.3 (for macOS) 

NVIDIA® for GPU support


NVIDIA® GPU driver

version 450.80.02

CUDA® Toolkit 

11.2

cuDNN SDK

8.1.0


Moreover, to enhance the latency and performance, TesnorFlowRT is recommended. All the requirements given above are authentic and you must never skip any of these if you want to get 100 efficiencies. Moreover, for the course we are working on, there is no need for any GPU as we are moving towards the basic course and we can install GPU in future if required.

Choosing the Best Installation Method for Anaconda

Now it's time to make a decision about the type of installation you want. This is the step that makes TensorFlow different from the other simple installations. If you're going to install it on your PC, you have to get help from another software. There is certain software through which you can install the library software with the help of Anaconda software. For this, we are going to the official website and installing the anaconda software.

install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

  • As soon as you will click on the download option, the loading will start and the software of Anaconda with the size 600+MBs will start downloading. It will take a few moments to be downloaded. 

  • Once the process discussed above is completed, you have to click on the installation button and the window will be pop-up on your screen where the installation steps have to be completed by you.  

install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

The installation process is so simple that many of you have known them before but the purpose to tell you about each and every step is, some people do not know much about the installation or have the habit to match the steps with the tutorials so they may know that they are at the right path.

install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

  • In the next step, you have to provide the path for the installation place of the anaconda. By default, as you expect, the C drive is set but I am going to change the directory. You can choose the path according to your choice. 

  • Now, you will see that it is asking for the settings according to your choice. By default, the second option is ticked and I am installing the Anaconda as it is and click on the installation process. 

  • Now, the installation process is starting and it will take some time.

    install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

    • While this step is taking a little time, you can read about the documentation of the TensorFlow. 

    • Once the installation is complete, the next button will direct you towards this window:

    install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

    In this way, Anaconda will be installed on your PC. You must know that it has multiple libraries, functions, and software within it and there is no need to check them all. For our practice, we just have to know about the Jupyter notebook. It will be cleared in just a bit How can we start and work with this notebook? 

    Installing the TensorFlow Framework

    It seems that you have successfully installed Anaconda and are now moving towards the installation of your required library. It is a simple and interesting process that requires no technical skills. You just have to follow the simple steps given next:

    • Go to the start menu of your window. 

    • Search for the “Anaconda command prompt."

    • Click on it, and a command prompt window will appear on your screen. 

    • You just have to write the following command and the Anaconda will automatically install this amazing library for you. 

    • As you can see, it mentions that the download of TensorFlow requires 266.3 MBs. Once this command is entered, the installation of the TensorFlow will carry out and you have to wait for some moments.

    install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

    To confirm the installation process, I am providing you with some important commands. You just have to type “python” in the command prompt, and Anaconda will confirm the presence of the python information on your PC. 

    • In the next step, to ensure that you have installed Tensorflow successfully, you can write the following command:


    Import TensorFlow as tf

    • If nothing happens in the command prompt, it means your library was successfully installed; otherwise, it throws an error.

    install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

    Hence, the TensorFlow library is successfully installed on our PCs. The same purpose is also completed with the help of Jupyter Navigator, and you will see it in detail.

    Installing the TensorFlow Environment with Jupyter Navigator

    Finally, for the perfect installation, we will search, follow the path Home>Search>Anaconda Navigator, and press enter. The following screen will appear here.

    install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

    You have to choose the “Environment” button and click on the “Create” button to create a new environment. A small window will appear, and you have to name your environment. I am going to name it "TensorFlow.”

    install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

    There is a possibility that it recommends the updated version if it is available. We recommend you have the latest version, but it is not necessary. As soon as you click on the "Create" button, in the lower right corner, you will see that your project is being loaded. 

    This step takes some time; in the meantime, you can check the other packages in the Anaconda software. 

    Installing the Keras with Jupyter

    There is a need for Keras API as you have seen in our previous lectures. But as a reminder, we must tell you that Keras is a high-level application programming interface that is specially designed for deep learning and machine learning by Google, and with the help of this PAI, TensorFlow provides you with perfect performance and efficient work. So, here are the steps to install Keras on your PC.

    • Open the Jupyter navigator.

    • Click on the "create" button. 

    • Write the name of your new environment, I am giving it the name "Keras,” as you were expecting. 

    • The next step is to load the environment, as you have seen in the case of TensorFlow as well. 

    These steps are identical to the creation of an environment for TensorFlow. It is not necessary to discuss why we are doing this and what the alternatives are. For now, you have to understand the straightforward procedure and follow it for practice. 

     Keep in mind that, till now, you have just installed the library and API, but for the working of both of these, you have to run them, and we will earn this in just a bit. 

    Checking for the Installation of TensorFlow

    The installation process does not end here. After the installation process, you have to check if everything is working properly or not. For this, go to the home page and then search for “Jupyter notebook." You must notice that there is a launch button at the bottom of this notebook’s section. If you found something else here, such as "Install,” then you have to first install the notebook by simply clicking on it, and then launch the notebook.

    install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

    As soon as you launch the Jupyter notebook, you will be directed to your browser, where the notebook is launched on the local host of your computer. Here, it's time to write the commands to check the presence and working of the TensorFlow. You have to go to the upper right side of the screen and choose the Python3 (ipykernel) mode. 

    Now, as you can see, you are directed towards the screen where a code may be run. So you have to write the following command here:

    Import tensorflow as tf

    From tensorflow import keras

    This may look the same as the previous way to install tensorflow, but it is a little bit different because now, at Jupyter, you can easily run your code and work more and more on it. It is more user-friendly and has the perfect working environment for the students and learners because of the efficient results all the time.

    install TensorFlow, TensorFlow installation, installation of TensorFlow, how to install TensorFlow, install TensorFlow for deep learning

    Keras is imported along with TensorFlow, and it is so easy to deal with deep learning with the help of this library and API. 

    If you do not remember these steps, do not worry because you will practice them again and again in this course, and after that, you will become an expert in TensorFlow. Another thing to mention is that you can easily launch Keras and TensorFlow together; you do not have to do them one after the other. But sometimes, it shows an error because of the difference in the Python version or other related issues. So it is a good practice to install them one after the other because, for both, the procedure is identical and is not long. 

    So, it was an informative and interesting lecture today. We have utilized the information from the previous lectures and tried to install and understand TensorFlow in detail. Not only this, but we also discussed the installation process of Keras, which has a helpful API, and understood the importance of using them together. Once you have started TensorFlow, you are now ready to use and work with it within Jupyter. Obviously, there are also other ways to do the same work as we have done here, but all of them are a little bit complex, and I found these procedures to be the best. If you have better options, let us know in the comment section or contact us directly through the website. 

    In the next session, we will work on TensorFlow and learn the basics of this amazing library. We will start from the basics and understand the workings and other procedures of this library. Till then, stay with us.