You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oh, I already solved this issue and forgot to put the solution here.
Step 1: Save the full model for best_metric.
if curr_acc >= best_metric:
model_state = self.model.state_dict()
out_path = os.path.join(self.cfg.OUTPUT_DIR, "best_model.pth")
torch.save(model_state, out_path)
Step 2: Train(Tuning) the model and get the checkpoint file. Besides,
Use 'model.load_state_dict(torch.load(cfg.MODEL.WEIGHT_PATH))' to load the checkpoint.
By the way, It is a naive way to do evaluation. I want to know how to use logits.pth to do the evaluation, because in your code, you just save the {"targets": total_targets, "joint_logits": joint_logits} in checkpoint file.
Hi, could you tell me how can I evaluate the model when I finished the tuning?
The text was updated successfully, but these errors were encountered: