udacity / deep-reinforcement-learning

Repo for the Deep Reinforcement Learning Nanodegree program
https://www.udacity.com/course/deep-reinforcement-learning-nanodegree--nd893
MIT License
4.9k stars 2.34k forks source link

Allow training in GPU and saving the model in CPU #27

Closed heejung closed 2 years ago

heejung commented 5 years ago

The weights need to be saved in CPU format in order to be read and displayed by the last code block because the last code block runs only on CPU. This code change makes it possible to save the weights in CPU format even when the training phase is run on a GPU enabled environment.