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: Compute the Principal Component. 
docstr_tok: ["Compute","the","Principal","Component","."]
code: def _compute_global_pc(self, dataset, session, limit=None):
      """Compute the Principal Component."""
      _dataset = dataset
      if isinstance(limit, int):
          _dataset = _dataset[:limit]
      d = _dataset
      s0, s1, s2, s3 = d.shape[0], d.shape[1], d.shape[2], d.shape[3]
      flat = np.reshape(d, (s0, s1 * s2 * s3))
      sigma = np.dot(flat.T, flat) / flat.shape[1]
      U, S, V = np.linalg.svd(sigma)
      pc = np.dot(np.dot(U, np.diag(1.0 / np.sqrt(S + _EPSILON))), U.T)
      self.global_pc.assign(pc, session)
      return pc
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  import pickle
  import tensorflow.compat.v1
label_desc: Use image node_id 18 for calling the DataPreprocessing obj's underlying member method code with example usage: obj._compute_global_pc(dataset, session, limit) and returns: pc