Skip to content

A small bug #8

Open
Open

Description

@George-Chia

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!

Activity

  1. ChanganVR commented on Apr 22, 2021

    @ChanganVR
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions