code: def __init__(self, depth, mode="resnet"):
      self.mode = mode
      basicblock = getattr(resnet_model, mode + "_basicblock", None)
      bottleneck = getattr(resnet_model, mode + "_bottleneck", None)
      self.num_blocks, self.block_func = {
          18: ([2, 2, 2, 2], basicblock),
          34: ([3, 4, 6, 3], basicblock),
          50: ([3, 4, 6, 3], bottleneck),
          101: ([3, 4, 23, 3], bottleneck),
          152: ([3, 8, 36, 3], bottleneck),
      }[depth]
      assert (
          self.block_func is not None
      ), "(mode={}, depth={}) not implemented!".format(mode, depth)
  
file_path: tensorpack/examples/ResNet/imagenet-resnet.py
imports: import argparse
  import os
  from tensorpack import QueueInput, TFDatasetInput, logger
  from tensorpack.callbacks import *
  from tensorpack.dataflow import FakeData
  from tensorpack.models import *
  from tensorpack.tfutils import argscope, SmartInit
  from tensorpack.train import SyncMultiGPUTrainerReplicated, TrainConfig, launch_train_with_config
  from tensorpack.utils.gpu import get_num_gpu
  from imagenet_utils import ImageNetModel, eval_classification, get_imagenet_dataflow, get_imagenet_tfdata
  import resnet_model
  from resnet_model import preact_group, resnet_backbone, resnet_group
label_desc: Use image node_id 1 to create a new Model object from inherited base classes: ImageNetModel with example: obj = Model(depth, mode)