code: def __init__(
      self, in_size, out_size, is_batchnorm, ks=4, stride=2, padding=1
  ):
      super(Downsample, self).__init__()
      self.ks = ks
      self.stride = stride
      self.padding = padding
      s = stride
      p = padding
      if is_batchnorm:
          self.conv = nn.Sequential(
              nn.Conv2d(in_size, out_size, ks, s, p),
              nn.BatchNorm2d(out_size),
              nn.ReLU(inplace=True),
          )
  
      else:
          self.conv = nn.Sequential(
              nn.Conv2d(in_size, out_size, ks, s, p),
              nn.ReLU(inplace=True),
          )
  
      # initialise the blocks
      for m in self.children():
          init_weights(m, init_type="kaiming")
  
imports: import torch
  import torch.nn
  import torch.nn.functional
  from torch.nn import init
label_desc: Use image node_id 1 to create a new Downsample object from inherited base classes: nn with example: obj = Downsample(in_size, out_size, is_batchnorm, ks, stride, padding)