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

Save params #107

Merged
merged 6 commits into from
Aug 1, 2019
Merged

Save params #107

merged 6 commits into from
Aug 1, 2019

Conversation

TomorrowIsAnOtherDay
Copy link
Collaborator

@TomorrowIsAnOtherDay TomorrowIsAnOtherDay commented Aug 1, 2019

This PR resolves #106 :

  1. add save() and restore() APIs for parl.Agent
  2. add unit test for the new feature.
Usage:
>> agent = AtariAgent()
>> agent.save('./model.ckpt')
>> agent.restore('./model.ckpt')
>> another_agent =  AtariAgent()
>> another_agent.restore('./model.ckpt')

@TomorrowIsAnOtherDay TomorrowIsAnOtherDay merged commit 7dafee7 into develop Aug 1, 2019
@TomorrowIsAnOtherDay TomorrowIsAnOtherDay deleted the save_params branch August 1, 2019 07:23
@zienn
Copy link

zienn commented Dec 20, 2019

File "/home/tianqi/Distributed-MultiAgentRL/train.py", line 293, in display
agent.restore('./model.ckpt')
File "/home/tianqi/anaconda3/lib/python3.6/site-packages/parl/core/fluid/agent.py", line 221, in restore
filename=filename)
File "/home/tianqi/anaconda3/lib/python3.6/site-packages/paddle/fluid/io.py", line 798, in load_params
filename=filename)
File "/home/tianqi/anaconda3/lib/python3.6/site-packages/paddle/fluid/io.py", line 675, in load_vars
raise TypeError("program's type should be Program")
TypeError: program's type should be Program

@TomorrowIsAnOtherDay
Copy link
Collaborator Author

@Termset Could you please open an issue and describe the details of your code?

@zienn
Copy link

zienn commented Dec 20, 2019

@Termset Could you please open an issue and describe the details of your code?

ok

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

Successfully merging this pull request may close these issues.

provide an example for saving and restoring trained model
3 participants