class_docstr: Data Preprocessing.
  
  Base class for applying common real-time data preprocessing.
  
  This class is meant to be used as an argument of `input_data`. When training
  a model, the defined pre-processing methods will be applied at both
  training and testing time. Note that DataAugmentation is similar to
  DataPreprocessing, but only applies at training time.
  
  Arguments:
      None.
  
  Parameters:
      methods: `list of function`. Augmentation methods to apply.
      args: A `list` of arguments to use for these methods.
class_docstr_tok: ["Data","Preprocessing",".","Base","class","for","applying","common","real-time","data","preprocessing",".","This","class","is","meant","to","be","used","as","an","argument","of","`","input_data","`",".","When","training","a","model",",","the","defined","pre-processing","methods","will","be","applied","at","both","training","and","testing","time",".","Note","that","DataAugmentation","is","similar","to","DataPreprocessing",",","but","only","applies","at","training","time",".","Arguments",":","None",".","Parameters",":","methods",":","`","list","of","function","`",".","Augmentation","methods","to","apply",".","args",":","A","`","list","`","of","arguments","to","use","for","these","methods","."]
docstr: Initialize preprocessing methods that pre-requires
  calculation over entire dataset. 
docstr_tok: ["Initialize","preprocessing","methods","that","pre-requires","calculation","over","entire","dataset","."]
code: def initialize(self, dataset, session, limit=None):
      """Initialize preprocessing methods that pre-requires
      calculation over entire dataset."""
      if self.global_mean.is_required:
          # If a value is already provided, it has priority
          if self.global_mean.value is not None:
              self.global_mean.assign(self.global_mean.value, session)
          # Otherwise, if it has not been restored, compute it
          if not self.global_mean.is_restored(session):
              print("---------------------------------")
              print(
                  "Preprocessing... Calculating mean over all dataset "
                  "(this may take long)..."
              )
              self._compute_global_mean(dataset, session, limit)
              print(
                  "Mean: " + str(self.global_mean.value) + " (To avoid "
                  "repetitive computation, add it to argument 'mean' of "
                  "`add_featurewise_zero_center`)"
              )
      if self.global_std.is_required:
          # If a value is already provided, it has priority
          if self.global_std.value is not None:
              self.global_std.assign(self.global_std.value, session)
          # Otherwise, if it has not been restored, compute it
          if not self.global_std.is_restored(session):
              print("---------------------------------")
              print(
                  "Preprocessing... Calculating std over all dataset "
                  "(this may take long)..."
              )
              self._compute_global_std(dataset, session, limit)
              print(
                  "STD: " + str(self.global_std.value) + " (To avoid "
                  "repetitive computation, add it to argument 'std' of "
                  "`add_featurewise_stdnorm`)"
              )
      if self.global_pc.is_required:
          # If a value is already provided, it has priority
          if self.global_pc.value is not None:
              self.global_pc.assign(self.global_pc.value, session)
          # Otherwise, if it has not been restored, compute it
          if not self.global_pc.is_restored(session):
              print("---------------------------------")
              print(
                  "Preprocessing... PCA over all dataset "
                  "(this may take long)..."
              )
              self._compute_global_pc(dataset, session, limit)
              with open("PC.pkl", "wb") as f:
                  pickle.dump(self.global_pc.value, f)
              print(
                  "PC saved to 'PC.pkl' (To avoid repetitive computation, "
                  "load this pickle file and assign its value to 'pc' "
                  "argument of `add_zca_whitening`)"
              )
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  import pickle
  import tensorflow.compat.v1
label_desc: Use image node_id 4 for calling the DataPreprocessing obj's underlying member method code with example usage: obj.initialize(dataset, session, limit) without return types