jupyter cuda设置 Posted on 2018-07-Wed Views: Views: 123456import osos.environ["CUDA_VISIBLE_DEVICES"]="0"torch.backends.cudnn.enabled = Trueprint(torch.cuda.device_count())gpus = [0]