MCPcopy Create free account
hub / github.com/OpenGVLab/UniFormerV2 / main

Function main

tools/run_net.py:15–40  ·  view source on GitHub ↗

Main function to spawn the train and test process.

()

Source from the content-addressed store, hash-verified

13
14
15def main():
16 """
17 Main function to spawn the train and test process.
18 """
19 args = parse_args()
20 cfg = load_config(args)
21 cfg = assert_and_infer_cfg(cfg)
22
23 # Perform training.
24 if cfg.TRAIN.ENABLE:
25 launch_job(cfg=cfg, init_method=args.init_method, func=train)
26
27 # Perform multi-clip testing.
28 if cfg.TEST.ENABLE:
29 launch_job(cfg=cfg, init_method=args.init_method, func=test)
30
31 # Perform model visualization.
32 if cfg.TENSORBOARD.ENABLE and (
33 cfg.TENSORBOARD.MODEL_VIS.ENABLE
34 or cfg.TENSORBOARD.WRONG_PRED_VIS.ENABLE
35 ):
36 launch_job(cfg=cfg, init_method=args.init_method, func=visualize)
37
38 # Run demo.
39 # if cfg.DEMO.ENABLE:
40 # demo(cfg)
41
42
43if __name__ == "__main__":

Callers 1

run_net.pyFile · 0.70

Calls 4

parse_argsFunction · 0.90
load_configFunction · 0.90
assert_and_infer_cfgFunction · 0.90
launch_jobFunction · 0.90

Tested by

no test coverage detected