class_docstr: AttentionModel model from
  `"Residual Attention Network for Image Classification"
  <https://arxiv.org/pdf/1704.06904.pdf>`_ paper.
  Input size is 224 x 224.
  
  Parameters
  ----------
  scale : tuple
      Network scale p, t, r.
  m : tuple
      Network scale m.Network scale is defined as 36m + 20.
      And normally m is a tuple of (m-1, m, m+1) except m==1 as (1, 1, 1).
  classes : int, default 1000
      Number of classification classes.
  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","model","from","`","``","Residual","Attention","Network","for","Image","Classification","''","<","https",":","\/\/arxiv.org\/pdf\/1704.06904.pdf",">","`","_","paper",".","Input","size","is","224","x","224",".","Parameters","--","--","--","--","--","scale",":","tuple","Network","scale","p",",","t",",","r.","m",":","tuple","Network","scale","m.Network","scale","is","defined","as","36m","+","20",".","And","normally","m","is","a","tuple","of","(","m-1",",","m",",","m+1",")","except","m==1","as","(","1",",","1",",","1",")",".","classes",":","int",",","default","1000","Number","of","classification","classes",".","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,
      scale,
      m,
      classes=1000,
      norm_layer=BatchNorm,
      norm_kwargs=None,
      **kwargs,
  ):
      super(ResidualAttentionModel, self).__init__(**kwargs)
      assert len(scale) == 3 and len(m) == 3
      m1, m2, m3 = m
      with self.name_scope():
          self.conv1 = nn.HybridSequential()
          with self.conv1.name_scope():
              self.conv1.add(
                  nn.Conv2D(
                      64,
                      kernel_size=7,
                      strides=2,
                      padding=3,
                      use_bias=False,
                  )
              )
              self.conv1.add(
                  norm_layer(
                      **({} if norm_kwargs is None else norm_kwargs)
                  )
              )
              self.conv1.add(nn.Activation("relu"))
          self.mpool1 = nn.MaxPool2D(pool_size=3, strides=2, padding=1)
          self.residual_block1 = ResidualBlock(256, in_channels=64)
          self.attention_module1 = nn.HybridSequential()
          _add_block(
              self.attention_module1,
              AttentionModule_stage1,
              m1,
              256,
              scale=scale,
              norm_layer=norm_layer,
              norm_kwargs=norm_kwargs,
          )
          self.residual_block2 = ResidualBlock(
              512, in_channels=256, stride=2
          )
          self.attention_module2 = nn.HybridSequential()
          _add_block(
              self.attention_module2,
              AttentionModule_stage2,
              m2,
              512,
              scale=scale,
              norm_layer=norm_layer,
              norm_kwargs=norm_kwargs,
          )
          self.residual_block3 = ResidualBlock(
              1024, in_channels=512, stride=2
          )
          self.attention_module3 = nn.HybridSequential()
          _add_block(
              self.attention_module3,
              AttentionModule_stage3,
              m3,
              1024,
              scale=scale,
              norm_layer=norm_layer,
              norm_kwargs=norm_kwargs,
          )
          self.residual_block4 = ResidualBlock(
              2048, in_channels=1024, stride=2
          )
          self.residual_block5 = ResidualBlock(2048)
          self.residual_block6 = ResidualBlock(2048)
          self.mpool2 = nn.HybridSequential()
          with self.mpool2.name_scope():
              self.mpool2.add(
                  norm_layer(
                      **({} if norm_kwargs is None else norm_kwargs)
                  )
              )
              self.mpool2.add(nn.Activation("relu"))
              self.mpool2.add(nn.AvgPool2D(pool_size=7, strides=1))
          self.fc = nn.Conv2D(classes, kernel_size=1)
  
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 ResidualAttentionModel object from inherited base classes: nn with example: obj = ResidualAttentionModel(scale, m, classes, norm_layer, norm_kwargs)