tensorflow 2.x判断GPU是否可用的方法

在cmd中输入python,进入到python环境,再输入下面两句 import tensorflow as tf tf.config.list_physical_devices(‘GPU’) 若输出为 则说明GPU可用
相关文章
相关标签/搜索