code: def get_logits(self, image):
      with argscope(
          [Conv2D, MaxPooling, AvgPooling, GlobalAvgPooling, BatchNorm],
          data_format="channels_first",
      ), argscope(Conv2D, use_bias=False):
          group = args.group
          if not args.v2:
              # Copied from the paper
              channels = {
                  3: [240, 480, 960],
                  4: [272, 544, 1088],
                  8: [384, 768, 1536],
              }
              mul = (
                  group * 4
              )  # #chan has to be a multiple of this number
              channels = [
                  int(math.ceil(x * args.ratio / mul) * mul)
                  for x in channels[group]
              ]
              # The first channel must be a multiple of group
              first_chan = int(
                  math.ceil(24 * args.ratio / group) * group
              )
          else:
              # Copied from the paper
              channels = {0.5: [48, 96, 192], 1.0: [116, 232, 464]}[
                  args.ratio
              ]
              first_chan = 24
  
          logger.info("#Channels: " + str([first_chan] + channels))
  
          l = Conv2D(
              "conv1",
              image,
              first_chan,
              3,
              strides=2,
              activation=BNReLU,
          )
          l = MaxPooling("pool1", l, 3, 2, padding="SAME")
  
          l = shufflenet_stage("stage2", l, channels[0], 4, group)
          l = shufflenet_stage("stage3", l, channels[1], 8, group)
          l = shufflenet_stage("stage4", l, channels[2], 4, group)
  
          if args.v2:
              l = Conv2D("conv5", l, 1024, 1, activation=BNReLU)
  
          l = GlobalAvgPooling("gap", l)
          logits = FullyConnected("linear", l, 1000)
          return logits
  
imports: import argparse
  import math
  import numpy
  import os
  import cv2
  from tensorpack import tfv1
  from tensorpack import *
  from tensorpack.dataflow import imgaug
  from tensorpack.tfutils import argscope, SmartInit, model_utils
  from tensorpack.tfutils.scope_utils import under_name_scope
  from tensorpack.utils import logger
  from tensorpack.utils.gpu import get_num_gpu
  from imagenet_utils import ImageNetModel, eval_classification, get_imagenet_dataflow
label_desc: Use image node_id 1 for calling the Model obj's underlying member method code with example usage: obj.get_logits(image) and returns: logits