docstr: Evaluate the model on a test dataset.
  
  Parameters
  ----------
  x : ndarray
      Test dataset (high-noise data). If 4D, it will be converted to 1D.
  y : ndarray
      Labels of the test dataset (low-noise data). If 4D, it will be
      converted to 1D.
  batch_size : int, optional
      Number of samples per gradient update.
  verbose : int, optional
      Verbosity mode. 0 = silent, 1 = progress bar, 2 = one line
      per epoch.
  steps : int, optional
      Total number of steps (batches of samples) before declaring the
      evaluation round finished.
  callbacks : list, optional
      List of callbacks to apply during evaluation.
  max_queue_size : int, optional
      Maximum size for the generator queue.
  workers : int, optional
      Maximum number of processes to spin up when using process-based
      threading.
  use_multiprocessing : bool, optional
      If `True`, use process-based threading.
  return_dict : bool, optional
      If `True`, loss and metric results are returned as a dictionary.
  
  Returns
  -------
  List or dict
      If `return_dict` is `False`, returns a list of [loss, metrics]
      values on the test dataset. If `return_dict` is `True`, returns
      a dictionary of metric names and their corresponding values.
docstr_tok: ["Evaluate","the","model","on","a","test","dataset",".","Parameters","--","--","--","--","--","x",":","ndarray","Test","dataset","(","high-noise","data",")",".","If","4D",",","it","will","be","converted","to","1D",".","y",":","ndarray","Labels","of","the","test","dataset","(","low-noise","data",")",".","If","4D",",","it","will","be","converted","to","1D",".","batch_size",":","int",",","optional","Number","of","samples","per","gradient","update",".","verbose",":","int",",","optional","Verbosity","mode",".","0","=","silent",",","1","=","progress","bar",",","2","=","one","line","per","epoch",".","steps",":","int",",","optional","Total","number","of","steps","(","batches","of","samples",")","before","declaring","the","evaluation","round","finished",".","callbacks",":","list",",","optional","List","of","callbacks","to","apply","during","evaluation",".","max_queue_size",":","int",",","optional","Maximum","size","for","the","generator","queue",".","workers",":","int",",","optional","Maximum","number","of","processes","to","spin","up","when","using","process-based","threading",".","use_multiprocessing",":","bool",",","optional","If","`","True","`",",","use","process-based","threading",".","return_dict",":","bool",",","optional","If","`","True","`",",","loss","and","metric","results","are","returned","as","a","dictionary",".","Returns","--","--","--","-","List","or","dict","If","`","return_dict","`","is","`","False","`",",","returns","a","list","of","[","loss",",","metrics","]","values","on","the","test","dataset",".","If","`","return_dict","`","is","`","True","`",",","returns","a","dictionary","of","metric","names","and","their","corresponding","values","."]
code: def evaluate(
      self,
      x,
      y,
      batch_size=None,
      verbose=1,
      steps=None,
      callbacks=None,
      max_queue_size=10,
      workers=1,
      use_multiprocessing=False,
      return_dict=False,
  ):
      """Evaluate the model on a test dataset.
  
      Parameters
      ----------
      x : ndarray
          Test dataset (high-noise data). If 4D, it will be converted to 1D.
      y : ndarray
          Labels of the test dataset (low-noise data). If 4D, it will be
          converted to 1D.
      batch_size : int, optional
          Number of samples per gradient update.
      verbose : int, optional
          Verbosity mode. 0 = silent, 1 = progress bar, 2 = one line
          per epoch.
      steps : int, optional
          Total number of steps (batches of samples) before declaring the
          evaluation round finished.
      callbacks : list, optional
          List of callbacks to apply during evaluation.
      max_queue_size : int, optional
          Maximum size for the generator queue.
      workers : int, optional
          Maximum number of processes to spin up when using process-based
          threading.
      use_multiprocessing : bool, optional
          If `True`, use process-based threading.
      return_dict : bool, optional
          If `True`, loss and metric results are returned as a dictionary.
  
      Returns
      -------
      List or dict
          If `return_dict` is `False`, returns a list of [loss, metrics]
          values on the test dataset. If `return_dict` is `True`, returns
          a dictionary of metric names and their corresponding values.
  
      """
      sz = x.shape
      if len(sz) == 4:
          x = np.reshape(x, (sz[0] * sz[1] * sz[2], sz[3]))
      sz = y.shape
      if len(sz) == 4:
          y = np.reshape(y, (sz[0] * sz[1] * sz[2], sz[3]))
      return self.model.evaluate(
          x=x,
          y=y,
          batch_size=batch_size,
          verbose=verbose,
          steps=steps,
          callbacks=callbacks,
          max_queue_size=max_queue_size,
          workers=workers,
          use_multiprocessing=use_multiprocessing,
          return_dict=return_dict,
      )
  
file_path: dipy/dipy/nn/cnn_1d_denoising.py
imports: from dipy.utils.optpkg import optional_package
  import numpy
label_desc: Use image node_id 6 for calling the Cnn1DDenoiser obj's underlying member method code with example usage: obj.evaluate(x, y, batch_size, verbose, steps, callbacks, max_queue_size, workers, use_multiprocessing, return_dict) and returns: self