PyTorch使用指定的GPU

来源:互联网 发布:牛彩纽约源码 编辑:程序博客网 时间:2024/06/06 11:04

最好的指定方式如下:

CUDA_VISIBLE_DEVICES=0 python your_script.py