<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Windows Archives - Nerd Corner</title>
	<atom:link href="https://nerd-corner.com/tag/windows-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://nerd-corner.com/tag/windows-en/</link>
	<description>Craft your dreams!</description>
	<lastBuildDate>Thu, 18 May 2023 14:12:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://nerd-corner.com/wp-content/uploads/2019/10/cropped-LogoNerdCorner-2-32x32.png</url>
	<title>Windows Archives - Nerd Corner</title>
	<link>https://nerd-corner.com/tag/windows-en/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Enable TensorFlow GPU under Windows</title>
		<link>https://nerd-corner.com/enable-tensorflow-gpu-under-windows/</link>
					<comments>https://nerd-corner.com/enable-tensorflow-gpu-under-windows/#comments</comments>
		
		<dc:creator><![CDATA[Nerds]]></dc:creator>
		<pubDate>Tue, 09 May 2023 21:40:43 +0000</pubDate>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Deep Learning]]></category>
		<category><![CDATA[GPU]]></category>
		<category><![CDATA[graphics card]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[Machine Learning]]></category>
		<category><![CDATA[ML]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Step by step guide]]></category>
		<category><![CDATA[Tensorflow]]></category>
		<category><![CDATA[TensorFlow GPU]]></category>
		<category><![CDATA[Tensorflow guide]]></category>
		<category><![CDATA[user guide]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://nerd-corner.com/de/?p=1376</guid>

					<description><![CDATA[<p>I am currently working on a hobby project where I want to translate German sentences into Bavarian using AI, for example on the website Dialektl.com. &#8230; </p>
<p>The post <a href="https://nerd-corner.com/enable-tensorflow-gpu-under-windows/">Enable TensorFlow GPU under Windows</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I am currently working on a hobby project where I want to translate German sentences into Bavarian using AI, for example on the website <a href="http://dialektl.com" target="_blank" rel="noopener">Dialektl.com</a>. I am working with Tensorflow, an open source platform for machine learning and deep learning. Tensorflow is one of the most widely used libraries for Deep Learning because it offers a wide range of features and a very active developer community. For almost all machine learning models, the training process is extremely computationally expensive. To increase the speed of the training process, it is recommended to use the computer&#8217;s graphics card (GPU) instead of the processor (CPU).</p>
<p>My naive thought was that Tensorflow would automatically use the GPU. However, you first have to follow the step-by-step instructions below in order for Tensorflow to recognise and use the GPU at all.</p>
<p><em><strong>You might also be interested in:</strong> <a href="https://nerd-corner.com/tensorflow-js-vs-tensorflow-python/">Should I use Tensorflow.js or Tensorflow (Python)?</a></em></p>
<p><strong>DISCLAIMER: As of version 2.11, Tensorflow no longer supports GPUs under Windows! Either change the operating system or downgrade Tensorflow to version 2.10. In addition, a graphics card from NVIDIA is required!</strong></p>
<h3>1. Checking the desired CUDA and cuDNN versions</h3>
<p>First, you should find out which CUDA and cuDNN version you need for TensorFlow. The website lists all versions of Tensorflow and the desired CUDA versions or cuDNN versions:<a href="https://www.tensorflow.org/install/source_windows#gpu"> https://www.tensorflow.org/install/source_windows#gpu</a></p>
<p><img fetchpriority="high" decoding="async" class="aligncenter wp-image-1372 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements.png" alt="tensorflow requirements" width="1120" height="562" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements.png 1128w, https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements-300x151.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements-1024x514.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/tensorflow_requirements-768x385.png 768w" sizes="(max-width: 1120px) 100vw, 1120px" /></p>
<h2>2. Checking your own graphics card</h2>
<p>As already mentioned in the disclaimer, the graphics card must be from NVIDIA. On the website <a href="https://developer.nvidia.com/cuda-gpus" target="_blank" rel="noopener">https://developer.nvidia.com/cuda-gpus</a> you can search for your own GPU and check the &#8220;Compute Capability&#8221;. The minimum requirement for Tensorflow is a value of 3.5, but this is fulfilled by all current graphics cards.</p>
<p><img decoding="async" class="aligncenter wp-image-1371 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures.png" alt="cuda architectures" width="1120" height="158" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures.png 1129w, https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures-300x42.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures-1024x144.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/cuda-architectures-768x108.png 768w" sizes="(max-width: 1120px) 100vw, 1120px" /></p>
<h2>3. Installing the latest NVIDIA drivers</h2>
<p>To enable the GPU for TensorFlow, the latest NVIDIA drivers must be installed. Simply go to the NVIDIA website and download the latest driver for your graphics card.</p>
<h2>4. Install Visual Studio (optional)</h2>
<p>In TensorFlow, some parts of the library have been written in C++ to maximise performance. Therefore, installing Visual Studio can help improve the compatibility and performance of TensorFlow:<a style="font-size: 1.125rem; color: midnightblue; outline: 0px;" href="https://visualstudio.microsoft.com/de/vs/"> https://visualstudio.microsoft.com/de/vs/</a></p>
<p><img decoding="async" class="aligncenter wp-image-1370 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/vs-studio-download.png" alt="Visual studio installer" width="690" height="304" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/vs-studio-download.png 694w, https://nerd-corner.com/wp-content/uploads/2023/05/vs-studio-download-300x132.png 300w" sizes="(max-width: 690px) 100vw, 690px" /></p>
<p>It is sufficient to select individual components here. I have selected everything with C++ in &#8220;Compiler, Buildtools and Runtimes&#8221; and also MS Build, which in turn automatically installs a few more components. All in all, however, over 25 GB!</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1369 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/VS-studio-components.png" alt="choose components in visual studio" width="880" height="751" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/VS-studio-components.png 885w, https://nerd-corner.com/wp-content/uploads/2023/05/VS-studio-components-300x256.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/VS-studio-components-768x655.png 768w" sizes="auto, (max-width: 880px) 100vw, 880px" /></p>
<h2>5. Install CUDA Toolkit</h2>
<p>The CUDA Toolkit is a toolkit for CUDA application development provided by NVIDIA. TensorFlow requires CUDA to run on the GPU. Simply download and install the version of the CUDA toolkit requested in step 1 from the NVIDIA website: <a href="https://developer.nvidia.com/cuda-downloads">https://developer.nvidia.com/cuda-downloads</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1368 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download.png" alt="download cuda toolkit" width="1130" height="889" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download.png 1135w, https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download-300x236.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download-1024x806.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/Cuda-toolkit-download-768x604.png 768w" sizes="auto, (max-width: 1130px) 100vw, 1130px" /></p>
<h2>6. Installing the cuDNN libraries</h2>
<p>cuDNN is a library of deep learning primitives provided by NVIDIA. TensorFlow also requires cuDNN to run on the GPU. cuDNN is free, but you have to create an account as NVIDIA Developer: <a href="https://developer.nvidia.com/rdp/cudnn-download">https://developer.nvidia.com/rdp/cudnn-download</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1367 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download.png" alt="cuDNN download" width="1710" height="875" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download.png 1717w, https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download-300x154.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download-1024x524.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download-768x393.png 768w, https://nerd-corner.com/wp-content/uploads/2023/05/cuDNN-download-1536x786.png 1536w" sizes="auto, (max-width: 1710px) 100vw, 1710px" /></p>
<p>After the download, the content must be unpacked. The content is moved to the &#8220;NVIDIA GPU Computing Toolkit&#8221; in the &#8220;Programs&#8221; folder. After moving, copy the file path of the &#8220;bin&#8221; folder.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1366 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/unzip-cuDNN.png" alt="unzip cuDNN" width="670" height="226" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/unzip-cuDNN.png 673w, https://nerd-corner.com/wp-content/uploads/2023/05/unzip-cuDNN-300x101.png 300w" sizes="auto, (max-width: 670px) 100vw, 670px" /></p>
<h2>7. Set PATH variable</h2>
<p>Open the environment variables by simply typing the term into the Windows search. Then edit the system variable &#8220;path&#8221; and add a new entry with the file path of the &#8220;bin&#8221; folder from the previous step.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-1365 zoooom" src="https://nerd-corner.com/wp-content/uploads/2023/05/path-variable.png" alt="Set path variable for tensorflow gpu" width="1220" height="203" srcset="https://nerd-corner.com/wp-content/uploads/2023/05/path-variable.png 1223w, https://nerd-corner.com/wp-content/uploads/2023/05/path-variable-300x50.png 300w, https://nerd-corner.com/wp-content/uploads/2023/05/path-variable-1024x170.png 1024w, https://nerd-corner.com/wp-content/uploads/2023/05/path-variable-768x127.png 768w" sizes="auto, (max-width: 1220px) 100vw, 1220px" /></p>
<h2>8. Creating a virtual environment</h2>
<p>It is recommended to install TensorFlow in a virtual environment to avoid conflicts with other Python packages. Ideally using Anaconda. Simply download and install here: <a href="https://www.anaconda.com/download">https://www.anaconda.com/download</a></p>
<p>Then start the Anaconda Navigator. Create a new environment under Environments &gt; Create. Then click on Home again and launch an existing Python IDE from here. Additional IDEs such as PyCharm should also be automatically displayed here after the download.</p>
<h2>9. Verify Tensorflow GPU support</h2>
<p>To check whether the TensorFlow GPU support was successfully detected, the Tensorflow package should first be installed in the Python IDE. But note that under Windows the GPU is only recognised up to version 2.10! In the following versions it is no longer recognised! Tensorflow 2.10 must therefore be installed.</p>
<p>Then run the following code to display a list of available GPUs:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="python">import tensorflow as tf

tf.config.list_physical_devices('GPU')</pre>
<p>&nbsp;</p>
<p>The post <a href="https://nerd-corner.com/enable-tensorflow-gpu-under-windows/">Enable TensorFlow GPU under Windows</a> appeared first on <a href="https://nerd-corner.com">Nerd Corner</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nerd-corner.com/enable-tensorflow-gpu-under-windows/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
