Albert-Z-Guo/Deep-Reinforcement-Stock-Trading

Save DDQN

yesungkeke opened this issue · 1 comments

Hi! Thank you for your answering!
I know what you mean,but my problem is that I modify model file names there like
if model_name == 'DDQN':
agent.model.save('saved_models/DDQN_ep' + str(e) + '.h5')
but the evaluate.py needs two files,one is"DDQN_ep10.h5", another is "DDQN_ep10_target.h5". I don't know how to save the "DDQN_ep10_target.h5",I can only save "DDQN_ep10.h5".
So I want to know how to do it.
Hope you can answer me ~
Sincerely!

Hi there, thanks for this feedback, I just updated the README and bumped TensorFlow to a supported stable version.

You can just run python3 evaluate.py --model_to_load=DDPG_ep10 to evaluate DDPG model. Model weights loading details are in DDPG.py.

Note that model weights may be broken when using a newer TensorFlow version so you may need to retrain the models.
In addition, TensorFlow has evolved a lot over the years and the way the models were written in this repo were largely deprecated and should be restructured accordingly.

This project was a toy project when I was learning deep reinforcement learning myself. For better framework and closer to real world trading applications, I'd recommend trying this repository: https://github.com/AI4Finance-Foundation/FinRL

Keep learning!