Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: [email protected]
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Take our 85+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Publication

Creating a Deep Learning Environment with a TensorFlow GPU
Deep Learning

Creating a Deep Learning Environment with a TensorFlow GPU

Last Updated on January 7, 2023 by Editorial Team

Last Updated on February 11, 2021 by Editorial Team

Author(s): Buse Yaren Tekin

Deep Learning

Hi! In this article, we will talk about how we can create a deep learning environment for our machine. Before starting the article, I will give information about the operating system and graphics processor I use. So let’s start!

Photo by Christian Wiediger on Unsplash

The machine I’m working with uses Windows 10 Pro as the operating system. If you want to learn the features of your graphics card, you can learn the features of your graphics card by typing dxdiag instead of searching.

⚙️OS: Windows 10 Pro
⚙️CUDA Toolkit: 10
⚙️cuDNN: 7.4
⚙️TensorFlow GPU: 1.14.0
⚙️Keras: 2.2.5

Step 1: Get Graphics Card Information

Image by ref[1]
Image by author

If you wish, you can learn this step in a short time by writing the code below to the terminal.

Then we need to go to NVIDIA’s website and make the necessary downloads. On the output, you will see the name of your graphics cards as in the next image.

Image by author

Step 2: Checking the Graphics Processor

Determine your processor suitable for your machine at https://developer.nvidia.com/cuda-gpus#collapse4. For example, in the image below, we have learned the processing capacity by checking the processor of the machine I work actively.

Controlling the Quadro RTX 5000 Processor

Step 3: Installing CUDA Toolkit and cuDNN Tool

Now we need to act very carefully in this step. We will need to install the CUDA and cuDNN tool, which match the TensorFlow version we will use. I would like to warn you that if you download different versions, you will encounter many errors.

Source[3]

I had initially installed tensorflow-gpu==1.15.0 as I had a lot of conflict with TensorFlow 2.x versions. However, I then ran into several version conflicts while running Mask RCNN. In this article, I am here with the errors corrected. If you follow these steps exactly, your code will work without errors.

💎 The compilations required for tensorflow-gpu==1.14.0 show 7.4 for cuDNN and version 10 for the CUDA Toolkit.

To access cuDNN versions, go to the link.

Compatible cuDNN version for CUDA 10.0

👉You can download the selected versions by clicking the link.

After installing these tools, we need to add them to the path variable.

Image source
CUDA Path Settings

If it wasn’t added as a Path variable, you need to check these settings. Control of system environment variables is very important 🧷

Step 4: Creating Virtual Environment

Additionally, since I use Anaconda Prompt, I created virtual environments with conda. And then we got into that virtual environment with the activate command.

Step 5: Install Tensorflow-gpu

Then we go to tensorflow-gpu setup. At this stage, let’s take care to install with conda, not pip. The reason for this is that you get your approval while installing. We will also see the CUDA and cuDNN versions installed while giving this approval.

Step 5: cuDNN and CUDA File Exchanges

When we open the cuDNN archive we downloaded, we will see the following folders.

Image by author

We copy these folders into the folders where CUDA is installed. For example, I copied it to the folder in C:Program FilesNVIDIA GPU Computing Toolkit CUDAv10.0.

After all these stages, TensorFlow GPU must be installed. If you wish, you can control the terminal with the following commands. For this, let’s not forget to write python to the terminal first!

Physical GPU Control

In addition I want to make a warning. If you get a warning or error caused by the version of the Skimage library like me, run the following command.

🔮After all these stages, your deep learning environment will work without any problems! I wish you healthy and beautiful days.

REFERENCES

  1. https://en.wikipedia.org/wiki/DxDiag
  2. https://towardsdatascience.com/tensorflow-gpu-installation-made-easy-use-conda-instead-of-pip-52e5249374bc
  3. https://www.tensorflow.org/install/source_windows
  4. https://www.tensorflow.org/
  5. https://developer.nvidia.com/cuda-toolkit-archive
  6. https://www.architectryan.com/2018/08/31/how-to-change-environment-variables-on-windows-10/


Creating a Deep Learning Environment with TensorFlow GPU was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

Published via Towards AI

Feedback ↓