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

After DQN training, how to use trained model? #34

Closed
zinwalin opened this issue Nov 26, 2019 · 3 comments
Closed

After DQN training, how to use trained model? #34

zinwalin opened this issue Nov 26, 2019 · 3 comments

Comments

@zinwalin
Copy link

image

@chuyangliu
Copy link
Owner

self._FREQ_SAVE controls the frequency to save model parameters during training. Here the value is 20000, which means that model parameters will be saved every 20000 learning steps.

Saved model parameters are represented by three files under directory logs: solver-net-<steps>.data-00000-of-00001, solver-net-<steps>.index, and solver-var-<steps>.json. To use a trained model, modify self._RESTORE_STEP to the steps you want to use.

For example, if you want to use the model trained with 100000 learning steps. Ensure the three files solver-net-100000.data-00000-of-00001, solver-net-100000.index, and solver-var-100000.json are placed under directory logs. Then modify self._RESTORE_STEP to 100000. Now run the program with python3 run.py -s dqn and you are good to go!

@zinwalin
Copy link
Author

to improve score, how to tweak parameters?

@chuyangliu
Copy link
Owner

You can tune parameters in this code region to improve score. I highly recommend going through the last four papers of the references section to understand how these parameters affect the score.

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