class_docstr: ### Description
      implementation of discrimator from
          Hu et al., "Freehand Ultrasound Image Simulation with Spatially-Conditioned
          Generative Adversarial Networks", MICCAI RAMBO 2017
          https://arxiv.org/abs/1707.05392
  
  ### Building blocks
  [FEATURE BLOCK]     - Convolutional layer (kernel size = 5, activation = selu)
                        + residual convolutiona layer (kernel size = 3, activation = selu, batch norm)
                        + convolutional layer (kernel size = 3, activation = selu, batch norm)
  
  [DOWN BLOCK]        - Downsampling block with residual connections:
                        Downsampling convolutional layer (stride = 2, kernel size = 3,
                        activation = selu, batch norm)
                        + residual convolutiona layer (kernel size = 3, activation = selu, batch norm)
                        + convolutional layer (kernel size = 3, activation = selu, batch norm)
  
  [FC]                - Fully connected layer
  
  If conditioning is used, it gets concatenated to the image at the discriminator input
  
  ### Diagram
  
  INPUT IMAGE --> [FEATURE BLOCK] --> [DOWN BLOCK]x5 --> [FC] --> OUTPUT LOGITS
  
  ### Constraints
class_docstr_tok: ["#","#","#","Description","implementation","of","discrimator","from","Hu","et","al.",",","``","Freehand","Ultrasound","Image","Simulation","with","Spatially-Conditioned","Generative","Adversarial","Networks","''",",","MICCAI","RAMBO","2017","https",":","\/\/arxiv.org\/abs\/1707.05392","#","#","#","Building","blocks","[","FEATURE","BLOCK","]","-","Convolutional","layer","(","kernel","size","=","5",",","activation","=","selu",")","+","residual","convolutiona","layer","(","kernel","size","=","3",",","activation","=","selu",",","batch","norm",")","+","convolutional","layer","(","kernel","size","=","3",",","activation","=","selu",",","batch","norm",")","[","DOWN","BLOCK","]","-","Downsampling","block","with","residual","connections",":","Downsampling","convolutional","layer","(","stride","=","2",",","kernel","size","=","3",",","activation","=","selu",",","batch","norm",")","+","residual","convolutiona","layer","(","kernel","size","=","3",",","activation","=","selu",",","batch","norm",")","+","convolutional","layer","(","kernel","size","=","3",",","activation","=","selu",",","batch","norm",")","[","FC","]","-","Fully","connected","layer","If","conditioning","is","used",",","it","gets","concatenated","to","the","image","at","the","discriminator","input","#","#","#","Diagram","INPUT","IMAGE","--",">","[","FEATURE","BLOCK","]","--",">","[","DOWN","BLOCK","]","x5","--",">","[","FC","]","--",">","OUTPUT","LOGITS","#","#","#","Constraints"]
docstr: :param name: layer name
docstr_tok: [":","param","name",":","layer","name"]
code: def __init__(self, name):
      """
  
      :param name: layer name
      """
      super(ImageDiscriminator, self).__init__(name=name)
  
      w_init = tf.random_normal_initializer(0, 0.02)
      b_init = tf.constant_initializer(0.001)
      # w_init = tf.contrib.layers.variance_scaling_initializer()
      # b_init = tf.constant_initializer(0)
  
      self.initializers = {"w": w_init, "b": b_init}
      self.chns = [32, 64, 128, 256, 512, 1024, 1]
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import tensorflow
  from niftynet.layer.activation import ActiLayer
  from niftynet.layer.convolution import ConvolutionalLayer
  from niftynet.layer.deconvolution import DeconvolutionalLayer
  from niftynet.layer.fully_connected import FullyConnectedLayer
  from niftynet.layer.gan_blocks import BaseDiscriminator
  from niftynet.layer.gan_blocks import BaseGenerator
  from niftynet.layer.gan_blocks import GANImageBlock
label_desc: Use image node_id 1 to create a new ImageDiscriminator object from inherited base classes: BaseDiscriminator with example: obj = ImageDiscriminator(name)