yandexdataschool / Practical_RL

A course in reinforcement learning in the wild

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyTorch notebooks should detect GPU and run on it if it's available

dniku opened this issue · comments

device = 'cuda' if torch.cuda.is_available() else 'cpu'
...
model = model.to(device)