我在Windows 10上运行Tensorflow 2时遇到了问题(只运行一个epoch),因此我正在尝试通过WSL2在Ubuntu上安装cuda和Tensorflow 2。我已经按照以下指南进行操作:https://ubuntu.com/tutorials/enabling-gpu-acceleration-on-ubuntu-on-wsl2-with-the-nvidia-cuda-platform#5-enjoy-ubuntu-on-wsl,这与Nvidia的指南非常相似,只是我安装了cuda版本11.4而不是最新的cuda 11.7:https://docs.nvidia.com/cuda/wsl-user-guide/index.html#installing-wsl2。
我现在不确定是否需要安装cuDNN以及应该安装哪个版本,是Windows还是Linux?(https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html)。当我运行笔记本时,出现了缺少cuDNN的问题。
请给予建议?
话虽如此,我在 Windows 上直接安装了 NVIDIA 驱动程序 / CUDA / cuDNN / TensorFlow 2 兼容设置,但有一天我在训练我的一些模型时遇到了问题(参见我的其他 stackoverflow 帖子)。
非常感谢。
我现在不确定是否需要安装cuDNN以及应该安装哪个版本,是Windows还是Linux?(https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html)。当我运行笔记本时,出现了缺少cuDNN的问题。
> physical_devices = tf.config.list_physical_devices('GPU')
> physical_devices
> 2022-06-03 18:30:28.966198: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory
> 2022-06-03 18:30:28.966233: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1850] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
> Skipping registering GPU devices...
My specs:
Ubuntu 20.04 via WSL2
Windows 10 21H2
Nvidia latest driver, 512.95 compatible with GeForce RTX 3060
Cuda Driver Version/ Runtime Version 11.6/11.4( can update this to 11.7?)
Tensorflow 2.9.1
Python 3.9.7.
请给予建议?
话虽如此,我在 Windows 上直接安装了 NVIDIA 驱动程序 / CUDA / cuDNN / TensorFlow 2 兼容设置,但有一天我在训练我的一些模型时遇到了问题(参见我的其他 stackoverflow 帖子)。
非常感谢。