code: def get_model_data(name, timings, errors):
      """Get model data for a single model."""
      # Load model config
      reset_cfg()
      load_cfg(model_zoo.get_config_file(name))
      (
          config_url,
          _,
          model_id,
          _,
          weight_url_full,
      ) = model_zoo.get_model_info(name)
      # Get model complexity
      cx = net.complexity(builders.get_model())
      # Inference time is measured in ms with a reference batch_size and num_gpus
      batch_size, num_gpus = 64, 1
      reference = (
          batch_size / cfg.TEST.BATCH_SIZE * cfg.NUM_GPUS / num_gpus
      )
      infer_time = timings[name]["test_fw_time"] * reference * 1000
      # Training time is measured in hours for 100 epochs over the ImageNet train set
      iterations = 1281167 / cfg.TRAIN.BATCH_SIZE * 100
      train_time = timings[name]["train_fw_bw_time"] * iterations / 3600
      # Gather all data about the model
      return {
          "config_url": "configs/" + config_url,
          "flops": round(cx["flops"] / 1e9, 1),
          "params": round(cx["params"] / 1e6, 1),
          "acts": round(cx["acts"] / 1e6, 1),
          "batch_size": cfg.TRAIN.BATCH_SIZE,
          "infer_time": round(infer_time),
          "train_time": round(train_time, 1),
          "error": round(errors[name]["top1_err"], 1),
          "model_id": model_id,
          "weight_url": weight_url_full,
      }
  
file_path: pycls/dev/model_zoo_tables.py
imports: import json
  import os
  import pycls.core.builders
  import pycls.core.net
  import pycls.models.model_zoo
  from pycls.core.config import cfg, load_cfg, reset_cfg
label_desc: Use image node_id 1 for calling a global function with example usage: get_model_data(name, timings, errors) and returns: dict