This should do the job for you: device = torch.device('cuda') model = ResNet(BasicBlock, [3, 4, 6, 3]) with torch.cuda.device(3): ...
確定! 回上一頁