code: def main():
      """Execute operation (train, test, time, etc.)."""
      args = parse_args()
      mode = args.mode
      config.load_cfg(args.cfg)
      cfg.merge_from_list(args.opts)
      config.assert_cfg()
      cfg.freeze()
      if mode == "info":
          print(builders.get_model()())
          print("complexity:", net.complexity(builders.get_model()))
      elif mode == "train":
          dist.multi_proc_run(
              num_proc=cfg.NUM_GPUS, fun=trainer.train_model
          )
      elif mode == "test":
          dist.multi_proc_run(
              num_proc=cfg.NUM_GPUS, fun=trainer.test_model
          )
      elif mode == "time":
          dist.multi_proc_run(
              num_proc=cfg.NUM_GPUS, fun=trainer.time_model
          )
      elif mode == "scale":
          cfg.defrost()
          cx_orig = net.complexity(builders.get_model())
          scaler.scale_model()
          cx_scaled = net.complexity(builders.get_model())
          cfg_file = config.dump_cfg()
          print("Scaled config dumped to:", cfg_file)
          print("Original model complexity:", cx_orig)
          print("Scaled model complexity:", cx_scaled)
  
file_path: pycls/tools/run_net.py
imports: import argparse
  import sys
  import pycls.core.builders
  import pycls.core.config
  import pycls.core.distributed
  import pycls.core.net
  import pycls.core.trainer
  import pycls.models.scaler
  from pycls.core.config import cfg
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types