class_docstr: ### Description
      implementation of V-Net:
        Milletari et al., "V-Net: Fully convolutional neural networks for
        volumetric medical image segmentation", 3DV '16
  
  ### Building Blocks
  (n)[dBLOCK]        - Downsampling VNet block with n conv layers (kernel size = 5,
                          with residual connections, activation = relu as default)
                          followed by downsampling conv layer (kernel size = 2,
                          stride = 2) + final activation
  (n)[uBLOCK]         - Upsampling VNet block with n conv layers (kernel size = 5,
                          with residual connections, activation = relu as default)
                          followed by deconv layer (kernel size = 2,
                          stride = 2) + final activation
  (n)[sBLOCK]         - VNet block with n conv layers (kernel size = 5,
                          with residual connections, activation = relu as default)
                          followed by 1x1x1 conv layer (kernel size = 1,
                          stride = 1) + final activation
  
  ### Diagram
  
  INPUT  -->  (1)[dBLOCK] - - - - - - - - - - - - - - - - (1)[sBLOCK] --> OUTPUT
                  |                                             |
                 (2)[dBLOCK] - - - - - - - - - - - - (2)[uBLOCK]
                      |                                   |
                      (3)[dBLOCK]  - - - - - - - (3)[uBLOCK]
                          |                           |
                          (3)[dBLOCK]  - - - (3)[uBLOCK]
                              |                   |
                              ----(3)[uBLOCk] ----
  
  
  ### Constraints
   - Input size should be divisible by 8
   - Input should be either 2D or 3D
class_docstr_tok: ["#","#","#","Description","implementation","of","V-Net",":","Milletari","et","al.",",","``","V-Net",":","Fully","convolutional","neural","networks","for","volumetric","medical","image","segmentation","''",",","3DV","'16","#","#","#","Building","Blocks","(","n",")","[","dBLOCK","]","-","Downsampling","VNet","block","with","n","conv","layers","(","kernel","size","=","5",",","with","residual","connections",",","activation","=","relu","as","default",")","followed","by","downsampling","conv","layer","(","kernel","size","=","2",",","stride","=","2",")","+","final","activation","(","n",")","[","uBLOCK","]","-","Upsampling","VNet","block","with","n","conv","layers","(","kernel","size","=","5",",","with","residual","connections",",","activation","=","relu","as","default",")","followed","by","deconv","layer","(","kernel","size","=","2",",","stride","=","2",")","+","final","activation","(","n",")","[","sBLOCK","]","-","VNet","block","with","n","conv","layers","(","kernel","size","=","5",",","with","residual","connections",",","activation","=","relu","as","default",")","followed","by","1x1x1","conv","layer","(","kernel","size","=","1",",","stride","=","1",")","+","final","activation","#","#","#","Diagram","INPUT","--",">","(","1",")","[","dBLOCK","]","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","-","(","1",")","[","sBLOCK","]","--",">","OUTPUT","|","|","(","2",")","[","dBLOCK","]","-","-","-","-","-","-","-","-","-","-","-","-","(","2",")","[","uBLOCK","]","|","|","(","3",")","[","dBLOCK","]","-","-","-","-","-","-","-","(","3",")","[","uBLOCK","]","|","|","(","3",")","[","dBLOCK","]","-","-","-","(","3",")","[","uBLOCK","]","|","|","--","--","(","3",")","[","uBLOCk","]","--","--","#","#","#","Constraints","-","Input","size","should","be","divisible","by","8","-","Input","should","be","either","2D","or","3D"]
docstr: :param num_classes: int, number of channels of output
  :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: activation function to use
  :param name: layer name
docstr_tok: [":","param","num_classes",":","int",",","number","of","channels","of","output",":","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",":","activation","function","to","use",":","param","name",":","layer","name"]
code: def __init__(
      self,
      num_classes,
      w_initializer=None,
      w_regularizer=None,
      b_initializer=None,
      b_regularizer=None,
      acti_func="relu",
      name="VNet",
  ):
      """
  
      :param num_classes: int, number of channels of output
      :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: activation function to use
      :param name: layer name
      """
  
      super(VNet, 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 = [16, 32, 64, 128, 256]
  
file_path: NiftyNet/niftynet/network/vnet.py
imports: from __future__ import absolute_import, print_function
  import tensorflow
  from niftynet.layer import layer_util
  from niftynet.layer.activation import ActiLayer
  from niftynet.layer.base_layer import TrainableLayer
  from niftynet.layer.convolution import ConvLayer
  from niftynet.layer.deconvolution import DeconvLayer
  from niftynet.layer.elementwise import ElementwiseLayer
  from niftynet.network.base_net import BaseNet
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 1 to create a new VNet object from inherited base classes: BaseNet with example: obj = VNet(num_classes, w_initializer, w_regularizer, b_initializer, b_regularizer, acti_func, name)