code: def get_net(
      batch_size,
      random_len=100,
      oshape=(3, 64, 64),
      ngf=128,
      code=None,
      layout="NCHW",
      dtype="float32",
  ):
      """get net of dcgan generator"""
      assert oshape[-1] == 64, "Only support 64x64 image"
      assert oshape[-2] == 64, "Only support 64x64 image"
  
      code = (
          relay.var("data", dtype=dtype, shape=(batch_size, random_len))
          if code is None
          else code
      )
      dense_weight = relay.var("dense_weight")
      dense = relay.nn.dense(
          code, weight=dense_weight, units=4 * 4 * ngf * 8
      )
      relu = relay.nn.relu(dense)
      # 4 x 4
      if layout == "NCHW":
          reshape = relay.reshape(relu, newshape=(-1, ngf * 8, 4, 4))
      elif layout == "NHWC":
          reshape = relay.reshape(relu, newshape=(-1, 4, 4, ngf * 8))
      else:
          raise ValueError("Invalid layout: " + layout)
      # 8 x 8
      dc8 = deconv2d_bn_relu(
          reshape,
          ishape=(ngf * 8, 4, 4),
          oshape=(ngf * 4, 8, 8),
          kshape=(4, 4),
          layout=layout,
          prefix="g2",
      )
      # 16x16
      dc16 = deconv2d_bn_relu(
          dc8,
          ishape=(ngf * 4, 8, 8),
          oshape=(ngf * 2, 16, 16),
          kshape=(4, 4),
          layout=layout,
          prefix="g3",
      )
      # 32x32
      dc32 = deconv2d_bn_relu(
          dc16,
          ishape=(ngf * 2, 16, 16),
          oshape=(ngf, 32, 32),
          kshape=(4, 4),
          layout=layout,
          prefix="g4",
      )
      # 64x64
      dc64 = deconv2d(
          dc32,
          ishape=(ngf, 32, 32),
          oshape=oshape[-3:],
          kshape=(4, 4),
          layout=layout,
          name="g5_deconv",
      )
      tanh = relay.tanh(dc64)
  
      args = relay.analysis.free_vars(tanh)
      return relay.Function(args, tanh)
  
imports: from tvm import relay
  from .None import layers
  from .init import create_workload
label_desc: Use image node_id 3 for calling a global function with example usage: get_net(batch_size, random_len, oshape, ngf, code, layout, dtype) and returns: relay