MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / main

Function main

projects/SparseRCNN/train_net.py:132–147  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

130
131
132def main(args):
133 cfg = setup(args)
134
135 if args.eval_only:
136 model = Trainer.build_model(cfg)
137 DetectionCheckpointer(model, save_dir=cfg.OUTPUT_DIR).resume_or_load(cfg.MODEL.WEIGHTS, resume=args.resume)
138 res = Trainer.test(cfg, model)
139 if cfg.TEST.AUG.ENABLED:
140 res.update(Trainer.test_with_TTA(cfg, model))
141 if comm.is_main_process():
142 verify_results(cfg, res)
143 return res
144
145 trainer = Trainer(cfg)
146 trainer.resume_or_load(resume=args.resume)
147 return trainer.train()
148
149
150if __name__ == "__main__":

Callers

nothing calls this directly

Calls 10

verify_resultsFunction · 0.90
build_modelMethod · 0.80
resume_or_loadMethod · 0.80
setupFunction · 0.70
TrainerClass · 0.70
testMethod · 0.45
updateMethod · 0.45
test_with_TTAMethod · 0.45
trainMethod · 0.45

Tested by

no test coverage detected