Fork me on GitHub 0

指定GPU显卡

os.environ["CUDA_VISIBLE_DEVICES"]="0"
device=torch.device('cuda' if torch.cuda.is_available() else 'cpu')

  

posted @ 2020-08-07 17:30  amazingcode  阅读(511)  评论(0编辑  收藏  举报