wsl tensorflow - ballgle/saltwiki GitHub Wiki
https://www.tensorflow.org/install/gpu
tf 1.15
conda create -n tf python=3.7
pip install tensorflow==1.15.0 -i https://pypi.douban.com/simple
pip install tensorflow-gpu==1.15.0 -i https://pypi.douban.com/simple
tf 2
conda create -n tf2 python=3.7
pip install tensorflow -i https://pypi.douban.com/simple
验证安装
docker run -it --gpus all -p 8888:8888 tensorflow/tensorflow:latest-gpu-py3-jupyter
docker run --gpus all -it --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 nvcr.io/nvidia/tensorflow:20.03-tf2-py3
tf 1.15
import tensorflow as tf
tf.test.is_gpu_available()
tf2
import tensorflow as tf
tf.config.list_physical_devices('GPU')