摘要: def try_gpu(i=0): #@save """如果存在,则返回gpu(i),否则返回cpu()""" if torch.cuda.device_count() >= i + 1: return torch.device(f'cuda:{i}') return torch.device('c 阅读全文
posted @ 2022-01-29 11:57 寻找烟花 阅读(48) 评论(0) 推荐(0) 编辑