class_docstr: Modified Bottleneck V1 from `"Deep Residual Learning for Image Recognition"
  <http://arxiv.org/abs/1512.03385>`_ paper.
  This is used for ResNet V1 for 50, 101, 152 layers. Its all convolutions are
  no bias to match with the original hrnet implementation.
  
  Parameters
  ----------
  channels : int
      Number of output channels.
  stride : int
      Stride size.
  downsample : bool, default False
      Whether to downsample the input.
  in_channels : int, default 0
      Number of input channels. Default is 0, to infer from the graph.
  last_gamma : bool, default False
      Whether to initialize the gamma of the last BatchNorm layer in each bottleneck to zero.
  use_se : bool, default False
      Whether to use Squeeze-and-Excitation module
  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: ["Modified","Bottleneck","V1","from","`","``","Deep","Residual","Learning","for","Image","Recognition","''","<","http",":","\/\/arxiv.org\/abs\/1512.03385",">","`","_","paper",".","This","is","used","for","ResNet","V1","for","50",",","101",",","152","layers",".","Its","all","convolutions","are","no","bias","to","match","with","the","original","hrnet","implementation",".","Parameters","--","--","--","--","--","channels",":","int","Number","of","output","channels",".","stride",":","int","Stride","size",".","downsample",":","bool",",","default","False","Whether","to","downsample","the","input",".","in_channels",":","int",",","default","0","Number","of","input","channels",".","Default","is","0",",","to","infer","from","the","graph",".","last_gamma",":","bool",",","default","False","Whether","to","initialize","the","gamma","of","the","last","BatchNorm","layer","in","each","bottleneck","to","zero",".","use_se",":","bool",",","default","False","Whether","to","use","Squeeze-and-Excitation","module","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,
      stride,
      downsample=False,
      in_channels=0,
      last_gamma=False,
      use_se=False,
      norm_layer=BatchNorm,
      norm_kwargs=None,
      **kwargs,
  ):
      super(OrigHRBottleneck, self).__init__(**kwargs)
      self.body = nn.HybridSequential(prefix="")
      # add use_bias=False here to match with the original implementation
      self.body.add(
          nn.Conv2D(
              channels // 4, kernel_size=1, strides=1, use_bias=False
          )
      )
      self.body.add(
          norm_layer(**({} if norm_kwargs is None else norm_kwargs))
      )
      self.body.add(nn.Activation("relu"))
      self.body.add(_conv3x3(channels // 4, stride, channels // 4))
      self.body.add(
          norm_layer(**({} if norm_kwargs is None else norm_kwargs))
      )
      self.body.add(nn.Activation("relu"))
      # add use_bias=False here to match with the original implementation
      self.body.add(
          nn.Conv2D(channels, kernel_size=1, strides=1, use_bias=False)
      )
  
      if use_se:
          self.se = nn.HybridSequential(prefix="")
          self.se.add(nn.Dense(channels // 16, use_bias=False))
          self.se.add(nn.Activation("relu"))
          self.se.add(nn.Dense(channels, use_bias=False))
          self.se.add(nn.Activation("sigmoid"))
      else:
          self.se = None
  
      if not last_gamma:
          self.body.add(
              norm_layer(**({} if norm_kwargs is None else norm_kwargs))
          )
      else:
          self.body.add(
              norm_layer(
                  gamma_initializer="zeros",
                  **({} if norm_kwargs is None else norm_kwargs),
              )
          )
  
      if downsample:
          self.downsample = nn.HybridSequential(prefix="")
          self.downsample.add(
              nn.Conv2D(
                  channels,
                  kernel_size=1,
                  strides=stride,
                  use_bias=False,
                  in_channels=in_channels,
              )
          )
          self.downsample.add(
              norm_layer(**({} if norm_kwargs is None else norm_kwargs))
          )
      else:
          self.downsample = None
  
imports: import numpy
  from mxnet.gluon import contrib
  from mxnet.gluon import nn
  from mxnet.gluon.nn import BatchNorm
  from mxnet.context import cpu
  from .resnet import BasicBlockV1, BottleneckV1, _conv3x3
label_desc: Use image node_id 1 to create a new OrigHRBottleneck object from inherited base classes: nn with example: obj = OrigHRBottleneck(channels, stride, downsample, in_channels, last_gamma, use_se, norm_layer, norm_kwargs)