解决Tensorflow找不到GPU的问题

Tensorflow找不到GPU

  • 问题发现
  • 问题解决

当我用以下代码查看GPU数量时,gpus返回的是一个空列表,说明tensorflow没有找到GPU。

import tensorflow as tf
# 查看gpu和cpu的数量
gpus = tf.config.experimental.list_physical_devices(device_type='GPU')
cpus = tf.config.experimental.list_physical_devices(device_type='CPU'

你可能感兴趣的:(tensorflow,人工智能,python)