docstr: A model object with some basic parameters that can be added to in the load() method. Each child of
  this class should be able to build and store a model composed of tensors, as well as convert an input
  tensor into an output tensor according to a model's schema. 
  
  Parameters
  ----------
  input_shape : tuple, optional
      Input dimensions of first layer. Not counting batch-size.
  input_tensor : tensor, optional
      If input_tensor is specified, will output a tensor
      created from input_tensor.
  downsize_filters_factor : int, optional
      If specified, the number of filters at each applicable layer in a model
      will be divided by downsize_filters_factor (with rounding if necessary).
      Different models may specify different implementations of the downsizing
      process.
  pool_size : tuple, optional
      Pool size for convolutional layers.
  filter_shape : tuple, optional
      Filter size for convolutional layers.
  dropout : float, optional
      Dropout percentage for children models. Each model's implementation of
      dropout will differ.
  batch_norm : bool, optional
      Whether layers are batch-normed in children models. Each model's implementation
      of which layers will be batch-normed is different.
  initial_learning_rate : float, optional
      Initial learning rate for the chosen optimizer type, if necessary.
  output_type, cost_function : str, optional
      Currently can choose from 'regression', which is an output the same size as input,
      'binary_label' which is a binary probability map, or 'categorical_label'
  num_outputs : int, optional
      If output_type is 'categorical_label', this specified how many outputs.
  activation : str, optional
      What type of activation to use at each layer. May be implemented differently in
      each model.
  padding : str, optional
      Padding for convolutional layers.
  backend : str, optional
      Determines deep learning framework for model implementation, if multiple available.
  **kwargs
      Addtional variables that may be needed in children classes.
docstr_tok: ["A","model","object","with","some","basic","parameters","that","can","be","added","to","in","the","load","(",")","method",".","Each","child","of","this","class","should","be","able","to","build","and","store","a","model","composed","of","tensors",",","as","well","as","convert","an","input","tensor","into","an","output","tensor","according","to","a","model","'s","schema",".","Parameters","--","--","--","--","--","input_shape",":","tuple",",","optional","Input","dimensions","of","first","layer",".","Not","counting","batch-size",".","input_tensor",":","tensor",",","optional","If","input_tensor","is","specified",",","will","output","a","tensor","created","from","input_tensor",".","downsize_filters_factor",":","int",",","optional","If","specified",",","the","number","of","filters","at","each","applicable","layer","in","a","model","will","be","divided","by","downsize_filters_factor","(","with","rounding","if","necessary",")",".","Different","models","may","specify","different","implementations","of","the","downsizing","process",".","pool_size",":","tuple",",","optional","Pool","size","for","convolutional","layers",".","filter_shape",":","tuple",",","optional","Filter","size","for","convolutional","layers",".","dropout",":","float",",","optional","Dropout","percentage","for","children","models",".","Each","model","'s","implementation","of","dropout","will","differ",".","batch_norm",":","bool",",","optional","Whether","layers","are","batch-normed","in","children","models",".","Each","model","'s","implementation","of","which","layers","will","be","batch-normed","is","different",".","initial_learning_rate",":","float",",","optional","Initial","learning","rate","for","the","chosen","optimizer","type",",","if","necessary",".","output_type",",","cost_function",":","str",",","optional","Currently","can","choose","from","'regression","'",",","which","is","an","output","the","same","size","as","input",",","'binary_label","'","which","is","a","binary","probability","map",",","or","'categorical_label'","num_outputs",":","int",",","optional","If","output_type","is","'categorical_label","'",",","this","specified","how","many","outputs",".","activation",":","str",",","optional","What","type","of","activation","to","use","at","each","layer",".","May","be","implemented","differently","in","each","model",".","padding",":","str",",","optional","Padding","for","convolutional","layers",".","backend",":","str",",","optional","Determines","deep","learning","framework","for","model","implementation",",","if","multiple","available",".","*","*","kwargs","Addtional","variables","that","may","be","needed","in","children","classes","."]
code: def __init__(self, **kwargs):
      """A model object with some basic parameters that can be added to in the load() method. Each child of
      this class should be able to build and store a model composed of tensors, as well as convert an input
      tensor into an output tensor according to a model's schema.
  
      Parameters
      ----------
      input_shape : tuple, optional
          Input dimensions of first layer. Not counting batch-size.
      input_tensor : tensor, optional
          If input_tensor is specified, will output a tensor
          created from input_tensor.
      downsize_filters_factor : int, optional
          If specified, the number of filters at each applicable layer in a model
          will be divided by downsize_filters_factor (with rounding if necessary).
          Different models may specify different implementations of the downsizing
          process.
      pool_size : tuple, optional
          Pool size for convolutional layers.
      filter_shape : tuple, optional
          Filter size for convolutional layers.
      dropout : float, optional
          Dropout percentage for children models. Each model's implementation of
          dropout will differ.
      batch_norm : bool, optional
          Whether layers are batch-normed in children models. Each model's implementation
          of which layers will be batch-normed is different.
      initial_learning_rate : float, optional
          Initial learning rate for the chosen optimizer type, if necessary.
      output_type, cost_function : str, optional
          Currently can choose from 'regression', which is an output the same size as input,
          'binary_label' which is a binary probability map, or 'categorical_label'
      num_outputs : int, optional
          If output_type is 'categorical_label', this specified how many outputs.
      activation : str, optional
          What type of activation to use at each layer. May be implemented differently in
          each model.
      padding : str, optional
          Padding for convolutional layers.
      backend : str, optional
          Determines deep learning framework for model implementation, if multiple available.
      **kwargs
          Addtional variables that may be needed in children classes.
      """
  
      # Inputs
      add_parameter(self, kwargs, "model", None)
      add_parameter(self, kwargs, "input_shape", (32, 32, 32, 1))
      add_parameter(self, kwargs, "input_tensor", None)
      add_parameter(self, kwargs, "dim", len(self.input_shape) - 1)
      add_parameter(self, kwargs, "channels", self.input_shape[-1])
  
      # Generic Model Parameters -- Optional
      add_parameter(self, kwargs, "pool_size", (2, 2, 2))
      add_parameter(self, kwargs, "filter_shape", (3, 3, 3))
      add_parameter(self, kwargs, "padding", "same")
      add_parameter(self, kwargs, "downsize_filters_factor", 1)
      add_parameter(self, kwargs, "max_filter", 512)
      add_parameter(self, kwargs, "kernel_size", (3, 3, 3))
      add_parameter(self, kwargs, "stride_size", (1, 1, 1))
      add_parameter(self, kwargs, "activation", "relu")
      add_parameter(self, kwargs, "optimizer", "Nadam")
      add_parameter(self, kwargs, "output_type", None)
      add_parameter(self, kwargs, "cost_function", "mse")
      add_parameter(self, kwargs, "dropout", 0.1)
      add_parameter(self, kwargs, "batch_norm", True)
      add_parameter(self, kwargs, "initial_learning_rate", 0.0001)
      add_parameter(self, kwargs, "num_outputs", 1)
  
      # Logging Parameters - Temporary
      add_parameter(
          self, kwargs, "output_log_file", "deepneuro_log.csv"
      )
      add_parameter(self, kwargs, "tensorboard_directory", None)
      add_parameter(self, kwargs, "tensorboard_run_directory", None)
  
      # DeepNeuro Parameters
      add_parameter(self, kwargs, "input_data", "input_data")
      add_parameter(self, kwargs, "targets", "ground_truth")
  
      # Misc
      add_parameter(self, kwargs, "verbose", True)
      add_parameter(self, kwargs, "hyperverbose", False)
      add_parameter(self, kwargs, "initial_build", True)
  
      # Callbacks -- Refactor later.
      self.callbacks = []
  
      # Derived Parameters
      self.write_file = None
      self.csv_writer = None
  
      # TODO: Phase out 'output_type' in favor of 'cost_function'
      if self.cost_function is not None:
          self.output_type = self.cost_function
  
      self.load(kwargs)
  
      if self.model is None and self.initial_build:
          self.build_model()
  
      self.outputs = []
  
      pass
  
imports: import csv
  from deepneuro.models.cost_functions import cost_function_dict
  from deepneuro.utilities.util import add_parameter, nifti_splitext
  from deepneuro.load.load import load
label_desc: Use image node_id 1 to create a new DeepNeuroModel object from inherited base classes: object with example: obj = DeepNeuroModel()