class_docstr: AttentionModel 56 model from
  `"Residual Attention Network for Image Classification"
  <https://arxiv.org/pdf/1704.06904.pdf>`_ paper.
  Input size is 28 x 28.
  Default size is for 28 stage input.
  If input size is different you need to change it suiting for your input size.
  
  Parameters
  ----------
  channels : int
      Output channels.
  size1 : int, default 28
      Upsampling size1.
  size2 : int, default 14
      Upsampling size2.
  scale : tuple, default (1, 2, 1)
      Network scale p, t, r.
  norm_layer : object
      Normalization layer used (default: :class:`mxnet.gluon.nn.BatchNorm`)
      Can be :class:`mxnet.gluon.nn.BatchNorm` or :class:`mxnet.gluon.contrib.nn.SyncBatchNorm`.
  norm_kwargs : dict
      Additional `norm_layer` arguments, for example `num_devices=4`
      for :class:`mxnet.gluon.contrib.nn.SyncBatchNorm`.
class_docstr_tok: ["AttentionModel","56","model","from","`","``","Residual","Attention","Network","for","Image","Classification","''","<","https",":","\/\/arxiv.org\/pdf\/1704.06904.pdf",">","`","_","paper",".","Input","size","is","28","x","28",".","Default","size","is","for","28","stage","input",".","If","input","size","is","different","you","need","to","change","it","suiting","for","your","input","size",".","Parameters","--","--","--","--","--","channels",":","int","Output","channels",".","size1",":","int",",","default","28","Upsampling","size1",".","size2",":","int",",","default","14","Upsampling","size2",".","scale",":","tuple",",","default","(","1",",","2",",","1",")","Network","scale","p",",","t",",","r.","norm_layer",":","object","Normalization","layer","used","(","default",":",":","class",":","`","mxnet.gluon.nn.BatchNorm","`",")","Can","be",":","class",":","`","mxnet.gluon.nn.BatchNorm","`","or",":","class",":","`","mxnet.gluon.contrib.nn.SyncBatchNorm","`",".","norm_kwargs",":","dict","Additional","`","norm_layer","`","arguments",",","for","example","`","num_devices=4","`","for",":","class",":","`","mxnet.gluon.contrib.nn.SyncBatchNorm","`","."]
code: def __init__(
      self,
      channels,
      size1=28,
      size2=14,
      scale=(1, 2, 1),
      norm_layer=BatchNorm,
      norm_kwargs=None,
      **kwargs,
  ):
      super(AttentionModule_stage2, self).__init__(**kwargs)
      p, t, r = scale
      with self.name_scope():
          self.first_residual_blocks = nn.HybridSequential()
          _add_block(
              self.first_residual_blocks,
              ResidualBlock,
              p,
              channels,
              norm_layer=norm_layer,
              norm_kwargs=norm_kwargs,
          )
  
          self.trunk_branches = nn.HybridSequential()
          _add_block(
              self.trunk_branches,
              ResidualBlock,
              t,
              channels,
              norm_layer=norm_layer,
              norm_kwargs=norm_kwargs,
          )
  
          self.mpool1 = nn.MaxPool2D(pool_size=3, strides=2, padding=1)
          self.softmax1_blocks = nn.HybridSequential()
          _add_block(
              self.softmax1_blocks,
              ResidualBlock,
              r,
              channels,
              norm_layer=norm_layer,
              norm_kwargs=norm_kwargs,
          )
          self.skip1_connection_residual_block = ResidualBlock(channels)
  
          self.mpool2 = nn.MaxPool2D(pool_size=3, strides=2, padding=1)
  
          self.softmax2_blocks = nn.HybridSequential()
          _add_block(
              self.softmax2_blocks,
              ResidualBlock,
              2 * r,
              channels,
              norm_layer=norm_layer,
              norm_kwargs=norm_kwargs,
          )
  
          self.interpolation2 = UpsamplingBilinear2d(size=size2)
          self.softmax3_blocks = nn.HybridSequential()
          _add_block(
              self.softmax3_blocks,
              ResidualBlock,
              r,
              channels,
              norm_layer=norm_layer,
              norm_kwargs=norm_kwargs,
          )
  
          self.interpolation1 = UpsamplingBilinear2d(size=size1)
  
          self.softmax4_blocks = nn.HybridSequential()
          _add_sigmoid_layer(
              self.softmax4_blocks, channels, norm_layer, norm_kwargs
          )
  
          self.last_blocks = ResidualBlock(channels)
  
imports: from mxnet.gluon import nn
  from mxnet.gluon.nn import BatchNorm
  from mxnet.gluon.block import HybridBlock
label_desc: Use image node_id 1 to create a new AttentionModule_stage2 object from inherited base classes: nn with example: obj = AttentionModule_stage2(channels, size1, size2, scale, norm_layer, norm_kwargs)