How to use the provided model checkpoint?
Hello, thank you for providing the repo. However, I am having problems for using the ResNet based ckpt you have provided. The state_dict is different with the r2gen model you have. Could you please provide an example of how we can use this checkpoint to generate text given a histology image? Thank you in advance.
have you included the following code?
resume_path = os.path.join(args.checkpoint_dir, 'model_best.pth')
print("Loading checkpoint: {} ...".format(resume_path))
checkpoint = torch.load(resume_path)['state_dict']
model_dict = model.state_dict()
state_dict = {k:v for k,v in checkpoint.items()}
model_dict.update(state_dict)
model.load_state_dict(model_dict)
@BanafshehKarimian you could use model.load_state_dict(model_dict, strict=False) to get rid of unnecessary weights.
Hello, thank you for providing the repo. However, I am having problems for using the ResNet based ckpt you have provided. The state_dict is different with the r2gen model you have. Could you please provide an example of how we can use this checkpoint to generate text given a histology image? Thank you in advance.
We find that the checkpoint we uploaded is wrong and should not be used for test. We are so sorry for our mistake. We will upload a new ckpt later.