Deep-Reinforcement-Learning-Algorithms-with-PyTorch icon indicating copy to clipboard operation
Deep-Reinforcement-Learning-Algorithms-with-PyTorch copied to clipboard

Device problem for DDQN

Open ierezell opened this issue 6 years ago • 0 comments
trafficstars

It's just to help improve this wondeful repo (so useful to test differents agents)

I got some troubles with devices training in a custom environement.

L.42 in BaseAgent, I replaced : self.device = "cuda:0" if torch.cuda.is_available() else "cpu" by : self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

Now it works like a charm ! I don't know if it was a bug a feature or just some weird config I had but I guess the second option is more general.

Thanks a lot for all your repo

ierezell avatar Oct 31 '19 21:10 ierezell