Zuerst habe ich eine neue Umgebung mit Anaconda erstellt, Tensorflow, Matplolib, OpenCV, Notebook und Numpy normalerweise installiert und außerdem Cudatoolkit und Cundnn installiert (laut Copilot ist dies in erforderlich). Als ich mit dem Training begann, war es langsam, und im Task-Manager konnte ich sehen, dass die GPU nicht verwendet wurde, sondern die CPU wie zuvor.
Ich habe den Befehl „nvidia-smi“ ausgeführt und der Treiber zeigt die GPU an. In der Umgebung funktioniert Tensor Flow nicht Ubuntu-Konsole und WSL, und es hat immer noch nicht funktioniert.
Meine Hardware ist: Ryzen 7 5700x, 32 GB RAM 3200, RTX 5060 TI 16 GB, NVME Gen3 1 TB, Windows 11 23h2, Python 3.10
Einige Fehler, die ich erhalte:
Code: Select all
python -m pip install --no-cache-dir tensorflow-cuda2.15.0 ERROR: Could not find a version that satisfies the requirement tensorflow-cuda2.15.0 (from versions: none) ERROR: No matching distribution found for tensorflow-cuda==2.15.
TF 2.15.0 Built with CUDA: False GPUs: []
TF: 2.15.0 Built with CUDA: False Physical GPUs: [] TF build info: { "is_cuda_build": false, "is_rocm_build": false, "is_tensorrt_build": false, "msvcp_dll_names": "msvcp140.dll,msvcp140_1.dll" }
Code: Select all
conda create -n tf_gpu_py310 python=3.10 -y
conda activate tf_gpu_py310
conda install -c conda-forge cudatoolkit=12.3 cudnn=8.9 -y
python -m pip install --upgrade pip setuptools wheel
python -m pip install --no-cache-dir tensorflow==2.15.0
python -c "import tensorflow as tf; print('TF',tf.__version__); print('Built with CUDA:', tf.test.is_built_with_cuda()); print('GPUs:', tf.config.list_physical_devices('GPU'))"
Mobile version