我最近在我的电脑上安装了tensorflow 2.0,但是当我尝试在GPU上运行它时,Jupyter或Vitual Studio代码上的函数tf.config.experimental.list_physical_devices('GPU')
会返回一个空数组。你知道为什么吗?你知道吗
我的设置:
计算机:MSI
处理器:Intel(R)Core(TM)i7-8750H CPU@2.220GHz
GPU 0:Intel(R)UHD图形630
GPU:NVIDIA GeForce GTX 1060
Python:ananconda3和python3.7
Tensenflow 2.0与pip install tensorflow
一起安装
我的测试代码:
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)
提前谢谢!:)
目前没有回答
相关问题 更多 >
编程相关推荐