Monday, 4 May 2020

How to set the device?

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")

No comments:

Post a Comment