MaskDINO icon indicating copy to clipboard operation
MaskDINO copied to clipboard

Should "SOLVER.STEPS" and "SOLVER.MAX_ITER" in config be changed when changing "SOLVER.IMS_PER_BATCH" during training?

Open sword-shadow opened this issue 2 years ago • 2 comments

Thanks for your excellent work. One question is that should "SOLVER.STEPS" and "SOLVER.MAX_ITER" in config be changed when changing "SOLVER.IMS_PER_BATCH" during training, or will they be corrected automatically? (If so, please point out the exact code location)

sword-shadow avatar May 15 '23 13:05 sword-shadow

Yes, these parameters are set without considering the batch size. If you reduce batch size, you are expected to increase the steps accordingly.

FengLi-ust avatar May 19 '23 11:05 FengLi-ust

Thanks. But I still have a question: why not set cfg.SOLVER.REFERENCE_WORLD_SIZE directly in the config file, so that the “auto_scale_workers“ function of the “detectron2.engine.DefaultTrainer“ class will automatically scale the hyperparameters?https://github.com/facebookresearch/detectron2/blob/main/detectron2/engine/defaults.py#LL633C9-L633C27

sword-shadow avatar May 22 '23 07:05 sword-shadow