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

Function main

tools/plain_train_net.py:206–222  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

204
205
206def main(args):
207 cfg = setup(args)
208
209 model = build_model(cfg)
210 logger.info("Model:\n{}".format(model))
211 if args.eval_only:
212 DetectionCheckpointer(model, save_dir=cfg.OUTPUT_DIR).resume_or_load(
213 cfg.MODEL.WEIGHTS, resume=args.resume
214 )
215 return do_test(cfg, model)
216
217 distributed = comm.get_world_size() > 1
218 if distributed:
219 model = DistributedDataParallel(
220<<<<<<< HEAD
221 model, device_ids=[comm.get_local_rank()], broadcast_buffers=False,
222 find_unused_parameters=True
223=======
224 model, device_ids=[comm.get_local_rank()], broadcast_buffers=False, find_unused_parameters=True
225>>>>>>> 7b936afd5b423c3188687d8b529a984bed528a87

Callers

nothing calls this directly

Calls 5

build_modelFunction · 0.90
do_testFunction · 0.85
resume_or_loadMethod · 0.80
setupFunction · 0.70

Tested by

no test coverage detected