class_docstr: .. image:: _static/img/nopool_aspp_arch.png
      :align: center
      :scale: 25%
  
  An ASPP-based model without initial pooling layers.
  
  :param drop_rate: dropout rate.
  :param bn_momentum: batch normalization momentum.
  
  .. seealso::
      Perone, C. S., et al (2017). Spinal cord gray matter
      segmentation using deep dilated convolutions.
      Nature Scientific Reports link:
      https://www.nature.com/articles/s41598-018-24304-3
class_docstr_tok: ["..","image",":",":","_static\/img\/nopool_aspp_arch.png",":","align",":","center",":","scale",":","25","%","An","ASPP-based","model","without","initial","pooling","layers",".",":","param","drop_rate",":","dropout","rate",".",":","param","bn_momentum",":","batch","normalization","momentum",".","..","seealso",":",":","Perone",",","C.","S.",",","et","al","(","2017",")",".","Spinal","cord","gray","matter","segmentation","using","deep","dilated","convolutions",".","Nature","Scientific","Reports","link",":","https",":","\/\/www.nature.com\/articles\/s41598-018-24304-3"]
code: def __init__(
      self, drop_rate=0.4, bn_momentum=0.1, base_num_filters=64
  ):
      super().__init__()
  
      self.conv1a = nn.Conv2d(
          1, base_num_filters, kernel_size=3, padding=1
      )
      self.conv1a_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.conv1a_drop = nn.Dropout2d(drop_rate)
      self.conv1b = nn.Conv2d(
          base_num_filters, base_num_filters, kernel_size=3, padding=1
      )
      self.conv1b_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.conv1b_drop = nn.Dropout2d(drop_rate)
  
      self.conv2a = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=2,
          dilation=2,
      )
      self.conv2a_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.conv2a_drop = nn.Dropout2d(drop_rate)
      self.conv2b = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=2,
          dilation=2,
      )
      self.conv2b_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.conv2b_drop = nn.Dropout2d(drop_rate)
  
      # Branch 1x1 convolution
      self.branch1a = nn.Conv2d(
          base_num_filters, base_num_filters, kernel_size=3, padding=1
      )
      self.branch1a_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch1a_drop = nn.Dropout2d(drop_rate)
      self.branch1b = nn.Conv2d(
          base_num_filters, base_num_filters, kernel_size=1
      )
      self.branch1b_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch1b_drop = nn.Dropout2d(drop_rate)
  
      # Branch for 3x3 rate 6
      self.branch2a = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=6,
          dilation=6,
      )
      self.branch2a_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch2a_drop = nn.Dropout2d(drop_rate)
      self.branch2b = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=6,
          dilation=6,
      )
      self.branch2b_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch2b_drop = nn.Dropout2d(drop_rate)
  
      # Branch for 3x3 rate 12
      self.branch3a = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=12,
          dilation=12,
      )
      self.branch3a_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch3a_drop = nn.Dropout2d(drop_rate)
      self.branch3b = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=12,
          dilation=12,
      )
      self.branch3b_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch3b_drop = nn.Dropout2d(drop_rate)
  
      # Branch for 3x3 rate 18
      self.branch4a = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=18,
          dilation=18,
      )
      self.branch4a_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch4a_drop = nn.Dropout2d(drop_rate)
      self.branch4b = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=18,
          dilation=18,
      )
      self.branch4b_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch4b_drop = nn.Dropout2d(drop_rate)
  
      # Branch for 3x3 rate 24
      self.branch5a = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=24,
          dilation=24,
      )
      self.branch5a_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch5a_drop = nn.Dropout2d(drop_rate)
      self.branch5b = nn.Conv2d(
          base_num_filters,
          base_num_filters,
          kernel_size=3,
          padding=24,
          dilation=24,
      )
      self.branch5b_bn = nn.BatchNorm2d(
          base_num_filters, momentum=bn_momentum
      )
      self.branch5b_drop = nn.Dropout2d(drop_rate)
  
      self.concat_drop = nn.Dropout2d(drop_rate)
      self.concat_bn = nn.BatchNorm2d(
          6 * base_num_filters, momentum=bn_momentum
      )
  
      self.amort = nn.Conv2d(
          6 * base_num_filters, base_num_filters * 2, kernel_size=1
      )
      self.amort_bn = nn.BatchNorm2d(
          base_num_filters * 2, momentum=bn_momentum
      )
      self.amort_drop = nn.Dropout2d(drop_rate)
  
      self.prediction = nn.Conv2d(
          base_num_filters * 2, 1, kernel_size=1
      )
  
imports: import torch
  import torch.nn
  from torch.nn import Module
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new NoPoolASPP object from inherited base classes: Module with example: obj = NoPoolASPP(drop_rate, bn_momentum, base_num_filters)