zh320 / realtime-semantic-segmentation-pytorch

PyTorch implementation of over 30 realtime semantic segmentations models, e.g. BiSeNetv1, BiSeNetv2, CGNet, ContextNet, DABNet, DDRNet, EDANet, ENet, ERFNet, ESPNet, ESPNetv2, FastSCNN, ICNet, LEDNet, LinkNet, PP-LiteSeg, SegNet, ShelfNet, STDC, SwiftNet, and support knowledge distillation, distributed training etc.
Apache License 2.0
78 stars 14 forks source link

About Load CheckPoint #12

Closed chris2000520 closed 1 month ago

chris2000520 commented 1 month ago

When I loaded the checkpoint, the program reported an error: Unable to load the optimizer, so I found this line of code. Why is the optimizer dictionary not saved when save_best is true? Will this affect my continued training?

'optimizer': self.optimizer.state_dict() if not save_best else None
'scheduler': self.scheduler.state_dict() if not save_best else None

Best Wishes!