class_docstr: Implementations based on the Vnet paper: https://arxiv.org/abs/1606.04797
class_docstr_tok: ["Implementations","based","on","the","Vnet","paper",":","https",":","\/\/arxiv.org\/abs\/1606.04797"]
code: def __init__(
      self,
      elu=False,
      in_channels=1,
      num_classes=2,
      pretrained=None,
      kernel_size=((2, 2, 2), (2, 2, 2), (2, 2, 2), (2, 2, 2)),
      stride_size=((2, 2, 2), (2, 2, 2), (2, 2, 2), (2, 2, 2)),
  ):
      super().__init__()
      self.best_loss = 1000000
      self.num_classes = num_classes
      self.in_channels = in_channels
  
      self.in_tr = InputTransition(in_channels, elu=elu)
      self.down_tr32 = DownTransition(
          16,
          1,
          elu,
          downsample_stride=stride_size[0],
          kernel=kernel_size[0],
      )
      self.down_tr64 = DownTransition(
          32,
          2,
          elu,
          downsample_stride=stride_size[1],
          kernel=kernel_size[1],
      )
      self.down_tr128 = DownTransition(
          64,
          3,
          elu,
          dropout=True,
          downsample_stride=stride_size[2],
          kernel=kernel_size[2],
      )
      self.down_tr256 = DownTransition(
          128,
          2,
          elu,
          dropout=True,
          downsample_stride=stride_size[3],
          kernel=kernel_size[3],
      )
      self.up_tr256 = UpTransition(
          256,
          256,
          2,
          elu,
          dropout=True,
          dropout2=True,
          upsample_stride_size=stride_size[3],
          kernel=kernel_size[3],
      )
      self.up_tr128 = UpTransition(
          256,
          128,
          2,
          elu,
          dropout=True,
          dropout2=True,
          upsample_stride_size=stride_size[2],
          kernel=kernel_size[2],
      )
      self.up_tr64 = UpTransition(
          128,
          64,
          1,
          elu,
          upsample_stride_size=stride_size[1],
          kernel=kernel_size[1],
      )
      self.up_tr32 = UpTransition(
          64,
          32,
          1,
          elu,
          upsample_stride_size=stride_size[0],
          kernel=kernel_size[0],
      )
      self.out_tr = OutputTransition(32, num_classes, elu)
  
      self.pretrained = pretrained
      self.init_weight()
  
imports: import os
  import sys
  import paddle
  import paddle.nn
  import numpy
  from inference.ops import DistMaps3D, ScaleLayer, BatchImageNormalize3D
  from paddleseg.utils import utils
label_desc: Use image node_id 1 to create a new VNet object from inherited base classes: nn with example: obj = VNet(elu, in_channels, num_classes, pretrained, kernel_size, stride_size)