多卡gpu时 指定用哪个GPU

在代码里

import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'

或者在terminal

export CUDA_VISIBLE_DEVICES=0

猜你喜欢

转载自blog.csdn.net/guotong1988/article/details/81209072
今日推荐