code: def __init__(
      self,
      in_filters,
      out_filters,
      reps,
      strides=1,
      padding=0,
      start_with_relu=True,
      grow_first=True,
  ):
      super(Block, self).__init__()
  
      if out_filters != in_filters or strides != 1:
          self.skip = layer.Conv2d(
              in_filters,
              out_filters,
              1,
              stride=strides,
              padding=padding,
              bias=False,
          )
          self.skipbn = layer.BatchNorm2d(out_filters)
      else:
          self.skip = None
  
      self.layers = []
  
      filters = in_filters
      if grow_first:
          self.layers.append(layer.ReLU())
          self.layers.append(
              layer.SeparableConv2d(
                  in_filters,
                  out_filters,
                  3,
                  stride=1,
                  padding=1,
                  bias=False,
              )
          )
          self.layers.append(layer.BatchNorm2d(out_filters))
          filters = out_filters
  
      for i in range(reps - 1):
          self.layers.append(layer.ReLU())
          self.layers.append(
              layer.SeparableConv2d(
                  filters, filters, 3, stride=1, padding=1, bias=False
              )
          )
          self.layers.append(layer.BatchNorm2d(filters))
  
      if not grow_first:
          self.layers.append(layer.ReLU())
          self.layers.append(
              layer.SeparableConv2d(
                  in_filters,
                  out_filters,
                  3,
                  stride=1,
                  padding=1,
                  bias=False,
              )
          )
          self.layers.append(layer.BatchNorm2d(out_filters))
  
      if not start_with_relu:
          self.layers = self.layers[1:]
      else:
          self.layers[0] = layer.ReLU()
  
      if strides != 1:
          self.layers.append(layer.MaxPool2d(3, strides, padding + 1))
  
      self.register_layers(*self.layers)
  
      self.add = layer.Add()
  
file_path: singa/examples/largedataset_cnn/autograd/xceptionnet.py
imports: from singa import autograd
  from singa import tensor
  from singa import device
  from singa import layer
  from singa import opt
  import numpy
  from tqdm import trange
label_desc: Use image node_id 1 to create a new Block object from inherited base classes: layer with example: obj = Block(in_filters, out_filters, reps, strides, padding, start_with_relu, grow_first)