Skip to content

error while running "packnet" #97

@HyunghoNa

Description

@HyunghoNa

Hi everyone.

when defining eval_algo at packnet.py in the following code, I confront the NoneType error

Image

def get_eval_algo(self, task_id):
# TODO: find a better way to do this
# save and load a new model and set all params where mask > current_task + 1 to 0
torch_save_model(
self.policy,
os.path.join(self.experiment_dir, "tmp_model.pth"),
cfg=self.cfg,
)
eval_algo = safe_device(
eval(self.cfg.lifelong.algo)(
eval(self.cfg.benchmark_name)().n_tasks, self.cfg
),
self.cfg.device,
)
model_state_dict, _, _ = torch_load_model(
os.path.join(self.experiment_dir, "tmp_model.pth")
)
eval_algo.policy.load_state_dict(model_state_dict)

Does anyone resolve this issue?

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