-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
when I loaded the model with the provided checkpoint, I found the following error:
"module 'models' has no attribute 'ICLIP_VITB16'. Did you mean: 'ACLIP_VITB16'?"
Here is my code to load the model:
ckpt_path = "/path/to/provided/checkpoint_best.pt"
ckpt = torch.load(ckpt_path, map_location='cpu')
state_dict = OrderedDict()
for k, v in ckpt['state_dict'].items():
state_dict[k.replace('module.', '')] = v
old_args = ckpt['args']
print("=> creating model: {}".format(old_args.model))
detailclip = getattr(models, old_args.model)()
detailclip.cuda()
detailclip.load_state_dict(state_dict, strict=True)
print("=> loaded resume checkpoint '{}' (epoch {})".format(args.resume, ckpt['epoch']))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels