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

DQN #349

Open
guest-oo opened this issue Apr 3, 2024 · 1 comment
Open

DQN #349

guest-oo opened this issue Apr 3, 2024 · 1 comment

Comments

@guest-oo
Copy link

guest-oo commented Apr 3, 2024

请问 我使用helloworld——DQN文件训练完成后 如何保存训练完成的神经网络参数以及在测试中对其进行使用。以及我应该如何设置自己想要的环境而不是gym现成的环境。

@stellawang196
Copy link
Contributor

In HelloWorld, it will save model during training and evaluation by using torch.save(actor.state_dict(), save_path). You can load it by using model.load_state_dict(torch.load(save_path)).

You may create your own environment class which can be inherited from gym.Env, and write your own step(), reset() and so on. Then you can use your env class and env_args to train the model.

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

2 participants