【Tensorflow】Tensorflow 2.0 GPU的使用與分配

1、得到當前主機上特定運算設備的列表 gpus = tf.config.experimental.list_physical_devices(device_type='GPU') cpus = tf.config.experimental.list_physical_devices(device_type='CPU') print(gpus, cpus) 2、設置當前程序可見的設備範圍 默認狀況下
相關文章
相關標籤/搜索