class_docstr: ### Description
      implementation of Res-Net:
        He et al., "Identity Mappings in Deep Residual Networks", arXiv:1603.05027v3
  
  ### Building Blocks
  [CONV]          - Convolutional layer, no activation, no batch norm
  (s)[DOWNRES]    - Downsample residual block.
                      Each block is composed of a first bottleneck block with stride s,
                      followed by n_blocks_per_resolution bottleneck blocks with stride 1.
                      Bottleneck blocks include a squeeze-and-excitation block
  [FC]            - Fully connected layer with nr output channels == num_classes
  
  ### Diagram
  
  INPUT --> [CONV] -->(s=1)[DOWNRES] --> (s=2)[DOWNRES] --> BN, ReLU, mean --> [FC] --> OUTPUT
  
  ### Constraints
class_docstr_tok: ["#","#","#","Description","implementation","of","Res-Net",":","He","et","al.",",","``","Identity","Mappings","in","Deep","Residual","Networks","''",",","arXiv:1603.05027v3","#","#","#","Building","Blocks","[","CONV","]","-","Convolutional","layer",",","no","activation",",","no","batch","norm","(","s",")","[","DOWNRES","]","-","Downsample","residual","block",".","Each","block","is","composed","of","a","first","bottleneck","block","with","stride","s",",","followed","by","n_blocks_per_resolution","bottleneck","blocks","with","stride","1",".","Bottleneck","blocks","include","a","squeeze-and-excitation","block","[","FC","]","-","Fully","connected","layer","with","nr","output","channels","==","num_classes","#","#","#","Diagram","INPUT","--",">","[","CONV","]","--",">","(","s=1",")","[","DOWNRES","]","--",">","(","s=2",")","[","DOWNRES","]","--",">","BN",",","ReLU",",","mean","--",">","[","FC","]","--",">","OUTPUT","#","#","#","Constraints"]
docstr: :param num_classes: int, number of channels of output
  :param n_features: array, number of features per ResNet block
  :param n_blocks_per_resolution: int, number of BottleneckBlock per DownResBlock
  :param w_initializer: weight initialisation for network
  :param w_regularizer: weight regularisation for network
  :param b_initializer: bias initialisation for network
  :param b_regularizer: bias regularisation for network
  :param acti_func: ctivation function to use
  :param name: layer name
docstr_tok: [":","param","num_classes",":","int",",","number","of","channels","of","output",":","param","n_features",":","array",",","number","of","features","per","ResNet","block",":","param","n_blocks_per_resolution",":","int",",","number","of","BottleneckBlock","per","DownResBlock",":","param","w_initializer",":","weight","initialisation","for","network",":","param","w_regularizer",":","weight","regularisation","for","network",":","param","b_initializer",":","bias","initialisation","for","network",":","param","b_regularizer",":","bias","regularisation","for","network",":","param","acti_func",":","ctivation","function","to","use",":","param","name",":","layer","name"]
code: def __init__(
      self,
      num_classes,
      n_features=[16, 64, 128],
      n_blocks_per_resolution=1,
      w_initializer=None,
      w_regularizer=None,
      b_initializer=None,
      b_regularizer=None,
      acti_func="relu",
      name="SE_ResNet",
  ):
      """
  
      :param num_classes: int, number of channels of output
      :param n_features: array, number of features per ResNet block
      :param n_blocks_per_resolution: int, number of BottleneckBlock per DownResBlock
      :param w_initializer: weight initialisation for network
      :param w_regularizer: weight regularisation for network
      :param b_initializer: bias initialisation for network
      :param b_regularizer: bias regularisation for network
      :param acti_func: ctivation function to use
      :param name: layer name
      """
  
      super(SE_ResNet, self).__init__(
          num_classes=num_classes,
          w_initializer=w_initializer,
          w_regularizer=w_regularizer,
          b_initializer=b_initializer,
          b_regularizer=b_regularizer,
          acti_func=acti_func,
          name=name,
      )
  
      self.n_features = n_features
      self.n_blocks_per_resolution = n_blocks_per_resolution
      self.Conv = functools.partial(
          ConvolutionalLayer,
          w_initializer=w_initializer,
          w_regularizer=w_regularizer,
          b_initializer=b_initializer,
          b_regularizer=b_regularizer,
          preactivation=True,
          acti_func=acti_func,
      )
  
imports: from __future__ import absolute_import, print_function
  import functools
  from collections import namedtuple
  import tensorflow
  from niftynet.layer import layer_util
  from niftynet.layer.base_layer import TrainableLayer
  from niftynet.layer.bn import BNLayer
  from niftynet.layer.convolution import ConvolutionalLayer
  from niftynet.layer.fully_connected import FCLayer
  from niftynet.layer.squeeze_excitation import ChannelSELayer
  from niftynet.network.base_net import BaseNet
label_desc: Use image node_id 1 to create a new SE_ResNet object from inherited base classes: BaseNet with example: obj = SE_ResNet(num_classes, n_features, n_blocks_per_resolution, w_initializer, w_regularizer, b_initializer, b_regularizer, acti_func, name)