After DQN training, how to use trained model?
zinwalin opened this issue · 3 comments
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!
to improve score, how to tweak parameters?
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.