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

A small bug #8

Open
George-Chia opened this issue Apr 15, 2021 · 1 comment
Open

A small bug #8

George-Chia opened this issue Apr 15, 2021 · 1 comment

Comments

@George-Chia
Copy link

I am reading your excellent code.
I found a small bug that failing to load the imitation model.
I suggest replacing model.load_state_dict_rl(torch.load(il_weight_file)) with policy.load_state_dict_rl(torch.load(il_weight_file)) in line 138 in train.py.
Thanks!

@ChanganVR ChanganVR reopened this Apr 22, 2021
@ChanganVR
Copy link
Owner

It looks like by default the policy saves the weights of policy.model

def save_model(self, file):
torch.save(self.model.state_dict(), file)

Only in model-predictive RL, it saves the weights differently. Were you trying to load the weights of model-predictive RL as initialization?

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