I feel that tensorfloe-gpu has more restrictions
A feasible method explored:
1. Install miniconda (anaconda does not work, if the machine is installed, it is recommended to uninstall)
2. Install conda install tensorflow=2.0.0 in the base environment
Here I tried the latest version 2.3, but it didn't work. Version 2.0.0 will be accompanied by cudatoolkit (10.0.130) and cudnn (7.6.5)
More concise
Then select the corresponding ipython kernel under vscode
3. Test whether the gpu version is available
import tensorflow as tf
if tf.test.gpu_device_name():
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
else:
print("Please install GPU version of TF")
If the above result appears, it proves to be available