docstr: Parameters
  ----------
  patch_overlaps: int, optional
      The amount of times a grid of patches is predicted over an entire
      output volume. Subsequent grids are offset from the original grid
      by patch_size / patch_overlaps, and the final output is the result
      of averaging over each grid for each voxel. Default is 1.
  input_patch_shape: tuple, optional
      The input dimensions of the predicted patches, not including batch
      size. If None, DeepNeuro will attempt to extract this value from the
      given model. Default is None.
  output_patch_shape: tuple, optional
      The output dimensions of the predicted patches, not including batch
      size. If smaller than the input patch size in any dimension, patches
      will be cropped symmetrically by the difference in size to meet this
      shape. Default is None.
  check_empty_patch: bool, optional
      Do not predict patches if they only contain zeros. Default is True.
  pad_borders: bool, optional
      Pads input borders by patch_size / 2 with zeros. This allows patches
      at the boundary of an image to be successfully predicted, albeit with
      zero infill values. Default is True.
  patch_dimensions: tuple or list, optional
  output_patch_dimensions: tuple or list, optional
docstr_tok: ["Parameters","--","--","--","--","--","patch_overlaps",":","int",",","optional","The","amount","of","times","a","grid","of","patches","is","predicted","over","an","entire","output","volume",".","Subsequent","grids","are","offset","from","the","original","grid","by","patch_size","\/","patch_overlaps",",","and","the","final","output","is","the","result","of","averaging","over","each","grid","for","each","voxel",".","Default","is","1.","input_patch_shape",":","tuple",",","optional","The","input","dimensions","of","the","predicted","patches",",","not","including","batch","size",".","If","None",",","DeepNeuro","will","attempt","to","extract","this","value","from","the","given","model",".","Default","is","None",".","output_patch_shape",":","tuple",",","optional","The","output","dimensions","of","the","predicted","patches",",","not","including","batch","size",".","If","smaller","than","the","input","patch","size","in","any","dimension",",","patches","will","be","cropped","symmetrically","by","the","difference","in","size","to","meet","this","shape",".","Default","is","None",".","check_empty_patch",":","bool",",","optional","Do","not","predict","patches","if","they","only","contain","zeros",".","Default","is","True",".","pad_borders",":","bool",",","optional","Pads","input","borders","by","patch_size","\/","2","with","zeros",".","This","allows","patches","at","the","boundary","of","an","image","to","be","successfully","predicted",",","albeit","with","zero","infill","values",".","Default","is","True",".","patch_dimensions",":","tuple","or","list",",","optional","output_patch_dimensions",":","tuple","or","list",",","optional"]
code: def load(self, kwargs):
      """Parameters
      ----------
      patch_overlaps: int, optional
          The amount of times a grid of patches is predicted over an entire
          output volume. Subsequent grids are offset from the original grid
          by patch_size / patch_overlaps, and the final output is the result
          of averaging over each grid for each voxel. Default is 1.
      input_patch_shape: tuple, optional
          The input dimensions of the predicted patches, not including batch
          size. If None, DeepNeuro will attempt to extract this value from the
          given model. Default is None.
      output_patch_shape: tuple, optional
          The output dimensions of the predicted patches, not including batch
          size. If smaller than the input patch size in any dimension, patches
          will be cropped symmetrically by the difference in size to meet this
          shape. Default is None.
      check_empty_patch: bool, optional
          Do not predict patches if they only contain zeros. Default is True.
      pad_borders: bool, optional
          Pads input borders by patch_size / 2 with zeros. This allows patches
          at the boundary of an image to be successfully predicted, albeit with
          zero infill values. Default is True.
      patch_dimensions: tuple or list, optional
      output_patch_dimensions: tuple or list, optional
  
      """
  
      super(PatchesInference, self).load(kwargs)
  
      # Patching Parameters
      add_parameter(self, kwargs, "patch_overlaps", 1)
      add_parameter(self, kwargs, "input_patch_shape", None)
      add_parameter(self, kwargs, "output_patch_shape", None)
      add_parameter(self, kwargs, "check_empty_patch", True)
      add_parameter(self, kwargs, "pad_borders", True)
      add_parameter(self, kwargs, "keep_channels", None)
  
      add_parameter(self, kwargs, "patch_dimensions", None)
      add_parameter(
          self, kwargs, "output_patch_dimensions", self.patch_dimensions
      )
  
      self.batch_size = 1
  
file_path: DeepNeuro/deepneuro/outputs/segmentation.py
imports: import numpy
  from deepneuro.outputs.inference import ModelInference
  from deepneuro.utilities.util import add_parameter, docker_print
label_desc: Use image node_id 1 for calling the PatchesInference obj's underlying member method code with example usage: obj.load(kwargs) without return types