MCPcopy Create free account
hub / github.com/ChenhongyiYang/QueryDet-PyTorch / start_train

Function start_train

train_tools/coco_train.py:189–203  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

187
188
189def start_train(args):
190 cfg = setup(args)
191 if args.eval_only:
192 model = Trainer.build_model(cfg)
193 DetectionCheckpointer(model, save_dir=cfg.OUTPUT_DIR).resume_or_load(
194 cfg.MODEL.WEIGHTS, resume=args.resume
195 )
196 res = Trainer.test(cfg, model)
197 if cfg.TEST.AUG.ENABLED:
198 res.update(Trainer.test_with_TTA(cfg, model))
199 if comm.is_main_process():
200 verify_results(cfg, res)
201 return res
202 trainer = Trainer(cfg, resume=args.resume, reuse_ckpt=args.no_pretrain)
203 return trainer.train()

Callers

nothing calls this directly

Calls 4

resume_or_loadMethod · 0.80
setupFunction · 0.70
TrainerClass · 0.70
testMethod · 0.45

Tested by

no test coverage detected