med-air / 3DSAM-adapter

Holistic Adaptation of SAM from 2D to 3D for Promptable Medical Image Segmentation
134 stars 12 forks source link

Could you please guide me on how to resume interrupted training? #37

Open limengran98 opened 1 month ago

limengran98 commented 1 month ago

Dear Author,

Thank you for your excellent work. Could you please guide me on how to resume interrupted training? The provided resume functionality in the code seems not to be working.

Best regards,

peterant330 commented 4 hours ago

Thanks for pointing out. We will fix it soon. You can refer to the file baselines/train.py first.

ckpt = torch.load(os.path.join(args.snapshot_path, "best.pth.tar")) start_epoch = ckpt["epoch"] best_loss = ckpt["best_val_loss"] seg_net.load_state_dict(ckpt["network_dict"]) seg_net_opt.load_state_dict(ckpt["opt_dict"]) lr_scheduler.load_state_dict(ckpt["lr_scheduler_dict"])