PyTorch notebooks should detect GPU and run on it if it's available
dniku opened this issue · comments
Dmitry Nikulin commented
device = 'cuda' if torch.cuda.is_available() else 'cpu'
...
model = model.to(device)
A course in reinforcement learning in the wild
dniku opened this issue · comments
device = 'cuda' if torch.cuda.is_available() else 'cpu'
...
model = model.to(device)