ikostrikov / pytorch-trpo

PyTorch implementation of Trust Region Policy Optimization
MIT License
433 stars 91 forks source link

What and When to send on the GPU? #18

Closed prathamesh0 closed 4 years ago

prathamesh0 commented 4 years ago

I'm new to pytorch and am having a hard time getting used to handling the variables properly on cpu and gpu. As we are calculating our own losses here, I am having trouble understanding what and when to send to the device (gpu). Would really appreciate an explanation of how to go about this. The code is quite well written and easy to understand btw.

prathamesh0 commented 4 years ago

Actually figured it out after some time. Thanks again for the implementation.