docstr: Build Retina Net architecture.
docstr_tok: ["Build","Retina","Net","architecture","."]
code: def build(self):
      """
      Build Retina Net architecture.
      """
  
      # Image size must be dividable by 2 multiple times.
      h, w = self.cf.patch_size[:2]
      if h / 2**5 != int(h / 2**5) or w / 2**5 != int(w / 2**5):
          raise Exception(
              "Image size must be dividable by 2 at least 5 times "
              "to avoid fractions when downscaling and upscaling."
              "For example, use 256, 320, 384, 448, 512, ... etc. "
          )
  
      # instanciate abstract multi dimensional conv class and backbone model.
      conv = mutils.NDConvGenerator(self.cf.dim)
      backbone = utils.import_module("bbone", self.cf.backbone_path)
  
      # build Anchors, FPN, Classifier / Bbox-Regressor -head
      self.np_anchors = mutils.generate_pyramid_anchors(
          self.logger, self.cf
      )
      self.anchors = torch.from_numpy(self.np_anchors).float().cuda()
      self.Fpn = backbone.FPN(
          self.cf, conv, operate_stride1=self.cf.operate_stride1
      )
      self.Classifier = Classifier(self.cf, conv)
      self.BBRegressor = BBRegressor(self.cf, conv)
      self.final_conv = conv(
          self.cf.end_filts,
          self.cf.num_seg_classes,
          ks=1,
          pad=0,
          norm=None,
          relu=None,
      )
  
imports: import utils.model_utils
  import utils.exp_utils
  import sys
  from cuda_functions.nms_2D.pth_nms import nms_gpu
  from cuda_functions.nms_3D.pth_nms import nms_gpu
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils
label_desc: Use image node_id 2 for calling the net obj's underlying member method code with example usage: obj.build() without return types