python - Issues with getting Tensorflow to work with RTX 4060 Laptop - Stack Overflow
I am trying to build a CNN model but have noticed that the epoch rates were incredibly slow at 2 seconds per step. I double checked my task manager and noticed that my GPU usage was at 0% and triple checked that Tensorflow was detecting 0 GPUs on the device.
I did some research online and tried building from source by installing the required python version, CuDNN, and CUDA based on the version of Tensorflow installed. However this still didn't work. It turns out that I needed to install WSL2 as I was using Windows 11 which was very easy to do by using the command wsl --install
. I was hoping for the best and thought this may fix the issue, but it didn't. Finally I tried modifying my paths in the environment variable and double checking on the bin, include, and lib directories in my CUDA v12.5 directory.
My final approach to attempting to resolve this issue was all found in this github discussion.
As for the code I have ran on VSC to check my GPU:
import tensorflow as tf
print("Num GPUs Available: ",len(tf.config.list_physical_devices('GPU')))
The output:
Num GPUs Available: 0
Tensorflow: 2.18.0
Python version: 3.12.8
CuDNN: 9.3
CUDA: 12.5
OS: Windows 11 with WSL2 installed
Method of installing python: Online
Method of installing CuDNN: Windows -> x86_64 -> Tarball -> 12
Method of installing CUDA: Windows -> x86_64 -> 11 -> exe (network)
Method of installing WSL2: running wsl --install
on windows powershell
Any further questions such as hardware specifications, please let me know. Thank you!
Edit: Running the exact same code to test how many readily available GPUs there are on my computer seemed to work on Google Colab by showing that 1 GPU was available. If no solutions work on my local IDE, I may have to rely on using Kaggle API instead and use Google Colab.
- 拥抱安卓的诺基亚能否逆势崛起?
- 微软Surface平板电脑将于10月份发布
- python - Why does Ridge Regression behave like this when visually tracking an object? - Stack Overflow
- opengl - How to render a FBO into an ImGui window? - Stack Overflow
- javascript - Chrome Extension with proxy, onAuthRequired never being triggered - Stack Overflow
- mip sdk - Can you use the mip sdk to apply a mpip sensitivity label to a .json? - Stack Overflow
- swiftui - Previewing SwiftData Records in Xcode Previews - Stack Overflow
- javascript - Responsiveness textContent (graphic) - Stack Overflow
- python - Sympy: Define custom derivative on symbol - Stack Overflow
- math - How do I rotate sprites by using polar coordinates in Godot 4.3? - Stack Overflow
- c++ - Refactor return type using clang transformer - Stack Overflow
- Trouble installing homebrew with ansible playbook, linux client and host nodes - Stack Overflow
- angular - How to resolve vitest errors; stylesheet imports and dynamically fetched modules - Stack Overflow
- python - Unable to get form data in database and getting type object 'UserRegister' has no attribute 'US
- javascript - How do I change file pathing after installation? - Stack Overflow
- volttron - POSTMAN REST Call Results in RPC Timed Out: 5 Seconds - Stack Overflow
- Page Performance Issue with Countdown in Angular on Component Reload - Stack Overflow