Tensorflow 2.0 List_physical_devices Doesn't Detect My Gpu
I recently install tensorflow 2.0 on my computer but when I try to run it on my GPU, the function tf.config.experimental.list_physical_devices('GPU') on Jupyter or Vitual Studio Co
Solution 1:
Providing the solution here (Answer Section), even though it is present in the Comment Section for the benefit of the community.
Instead of pip install tensorflow
, you can try pip3 install --upgrade tensorflow-gpu
or just remove tensorflow
and then installing "tensorflow-gpu
will resolves your issue.
After installation of Tensorflow GPU, you can check GPU as below
physical_devices = tf.config.experimental.list_physical_devices('GPU')
print(physical_devices)
if physical_devices:
tf.config.experimental.set_memory_growth(physical_devices[0], True)
Output:
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
Solution 2:
Upgrading simply worked for me.:
pip3 install --upgrade tensorflow-gpu
and the device name searched has to be 'XLA_GPU', and does not respond with solo 'GPU' search term. But it also raised another error when setting the memory growth which is not supported by 'XLA' gpus.
Post a Comment for "Tensorflow 2.0 List_physical_devices Doesn't Detect My Gpu"