mlech26l / ncps

PyTorch and TensorFlow implementation of NCP, LTC, and CfC wired neural models
https://www.nature.com/articles/s42256-020-00237-3
Apache License 2.0
1.86k stars 297 forks source link

Pytorch model behaves differently after saving #58

Closed adamdai closed 6 months ago

adamdai commented 6 months ago

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 commented 6 months ago

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