只需要在python脚本中添加两行代码: caffe.set_device(0) #使用第一块显卡 caffe.set_mode_gpu() #设为gpu模式 这样,就可以在默认显卡被占用(第一块显卡)时,选择其他显卡进行测试了。 相关文章: 2021-11-18 2021-09-09 2021-08-22 2021-06-03 2021-10-17 2021-05-19 2021-05-16 2022-12-23