justinkay / aldi

Official implementation of "Align and Distill: Unifying and Improving Domain Adaptive Object Detection"
https://aldi-daod.github.io/
47 stars 7 forks source link

code resume #24

Closed behnaz-sadeghigol closed 2 months ago

behnaz-sadeghigol commented 2 months ago

I have to run the code on colab. Because of this, I need the ability to stop execution and resume it later, and ensure that every time I start, it run where the previous execution left off. How can I implement this feature in code?

justinkay commented 2 months ago

Hi @behnaz-sadeghigol, this is done the same as in Detectron2. You can use the config value SOLVER.CHECKPOINT_PERIOD to specify how often to save a model checkpoint during training, then running train_net.py with the --resume flag will resume from the last checkpoint saved.