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

在cmd中輸入python,進入到python環境,再輸入下面兩句 import tensorflow as tf tf.config.list_physical_devices(‘GPU’) 若輸出爲 則說明GPU可用
相關文章
相關標籤/搜索