Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytorch model behaves differently after saving #58

Closed
adamdai opened this issue Dec 11, 2023 · 1 comment
Closed

Pytorch model behaves differently after saving #58

adamdai opened this issue Dec 11, 2023 · 1 comment

Comments

@adamdai
Copy link

adamdai commented Dec 11, 2023

After running the atari_torch.py example, I am able to get good performance on breakout after training for a few epochs. However, when I save the trained model using torch.save(model.state_dict()), then load the model, the same model's performance is poor, and the agent stays to the left side and does not move as opposed to actually playing the game. Any reason why this might be happening?

@adamdai
Copy link
Author

adamdai commented Dec 11, 2023

My bad, the problem seems to be from not calling model.eval() after loading. Thanks!

@adamdai adamdai closed this as completed Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant