机器学习/tensorflow:修订间差异
来自康健生活
| 第15行: | 第15行: | ||
2.7.0 | 2.7.0 | ||
</syntaxhighlight>|$|/home/kangkk}} | </syntaxhighlight>|$|/home/kangkk}} | ||
记录设备指派,查看安装的是 CPU 版本还是 GPU 版本。 | |||
{{Hc|checkCPUorGPU.py|<syntaxhighlight lang="python"> | |||
from tensorflow.python.client import device_lib | |||
print(device_lib.list_local_devices())</syntaxhighlight>}} | |||