docstr: test method. wrapper around forward pass of network without usage of any ground truth information.
  prepares input data for processing and stores outputs in a dictionary.
  :param batch: dictionary containing 'data'
  :param return_masks: boolean. If True, full resolution masks are returned for all proposals (speed trade-off).
  :return: results_dict: dictionary with keys:
         'boxes': list over batch elements. each batch element is a list of boxes. each box is a dictionary:
                 [[{box_0}, ... {box_n}], [{box_0}, ... {box_n}], ...]
         'seg_preds': pixel-wise class predictions (b, 1, y, x, (z)) with values [0, n_classes]
docstr_tok: ["test","method",".","wrapper","around","forward","pass","of","network","without","usage","of","any","ground","truth","information",".","prepares","input","data","for","processing","and","stores","outputs","in","a","dictionary",".",":","param","batch",":","dictionary","containing","'data'",":","param","return_masks",":","boolean",".","If","True",",","full","resolution","masks","are","returned","for","all","proposals","(","speed","trade-off",")",".",":","return",":","results_dict",":","dictionary","with","keys",":","'boxes","'",":","list","over","batch","elements",".","each","batch","element","is","a","list","of","boxes",".","each","box","is","a","dictionary",":","[","[","{","box_0","}",",","...","{","box_n","}","]",",","[","{","box_0","}",",","...","{","box_n","}","]",",","...","]","'seg_preds","'",":","pixel-wise","class","predictions","(","b",",","1",",","y",",","x",",","(","z",")",")","with","values","[","0",",","n_classes","]"]
code: def test_forward(self, batch, return_masks=True):
      """
      test method. wrapper around forward pass of network without usage of any ground truth information.
      prepares input data for processing and stores outputs in a dictionary.
      :param batch: dictionary containing 'data'
      :param return_masks: boolean. If True, full resolution masks are returned for all proposals (speed trade-off).
      :return: results_dict: dictionary with keys:
             'boxes': list over batch elements. each batch element is a list of boxes. each box is a dictionary:
                     [[{box_0}, ... {box_n}], [{box_0}, ... {box_n}], ...]
             'seg_preds': pixel-wise class predictions (b, 1, y, x, (z)) with values [0, n_classes]
      """
      img = batch["data"]
      img = torch.from_numpy(img).float().cuda()
      _, _, _, detections, seg_logits = self.forward(img)
      results_dict = get_results(
          self.cf, img.shape, detections, seg_logits
      )
      return results_dict
  
imports: import utils.model_utils
  import utils.exp_utils
  from cuda_functions.nms_2D.pth_nms import nms_gpu
  from cuda_functions.nms_3D.pth_nms import nms_gpu
  from cuda_functions.roi_align_2D.roi_align.crop_and_resize import CropAndResizeFunction
  from cuda_functions.roi_align_3D.roi_align.crop_and_resize import CropAndResizeFunction
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.utils
label_desc: Use image node_id 4 for calling the net obj's underlying member method code with example usage: obj.test_forward(batch, return_masks) and returns: results_dict