code: def shufflenet_unit(l, out_channel, group, stride):
      in_shape = l.get_shape().as_list()
      in_channel = in_shape[1]
      shortcut = l
  
      # "We do not apply group convolution on the first pointwise layer
      #  because the number of input channels is relatively small."
      first_split = group if in_channel > 24 else 1
      l = Conv2D(
          "conv1",
          l,
          out_channel // 4,
          1,
          split=first_split,
          activation=BNReLU,
      )
      l = channel_shuffle(l, group)
      l = DepthConv("dconv", l, out_channel // 4, 3, stride=stride)
      l = BatchNorm("dconv_bn", l)
  
      l = Conv2D(
          "conv2",
          l,
          out_channel if stride == 1 else out_channel - in_channel,
          1,
          split=group,
      )
      l = BatchNorm("conv2_bn", l)
      if stride == 1:  # unit (b)
          output = tf.nn.relu(shortcut + l)
      else:  # unit (c)
          shortcut = AvgPooling(
              "avgpool", shortcut, 3, 2, padding="SAME"
          )
          output = tf.concat([shortcut, tf.nn.relu(l)], axis=1)
      return output
  
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 3 for calling a global function with example usage: shufflenet_unit(l, out_channel, group, stride) and returns: output