class_docstr: Image Preprocessing.
  
  Base class for applying real-time image related pre-processing.
  
  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 ImageAugmentation is similar to
  ImagePreprocessing, but only applies at training time.
class_docstr_tok: ["Image","Preprocessing",".","Base","class","for","applying","real-time","image","related","pre-processing",".","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","ImageAugmentation","is","similar","to","ImagePreprocessing",",","but","only","applies","at","training","time","."]
docstr: Compute std of a dataset. A limit can be specified for faster
  computation, considering only 'limit' first elements. 
docstr_tok: ["Compute","std","of","a","dataset",".","A","limit","can","be","specified","for","faster","computation",",","considering","only","'limit","'","first","elements","."]
code: def _compute_global_std(self, dataset, session, limit=None):
      """Compute std of a dataset. A limit can be specified for faster
      computation, considering only 'limit' first elements."""
      _dataset = dataset
      std = 0.0
      if isinstance(limit, int):
          _dataset = _dataset[:limit]
      if isinstance(_dataset, np.ndarray) and not self.global_std_pc:
          std = np.std(_dataset)
      else:
          for i in range(len(dataset)):
              if not self.global_std_pc:
                  std += np.std(dataset[i]) / len(dataset)
              else:
                  std += (
                      np.std(dataset[i], axis=(0, 1), keepdims=True)
                      / len(dataset)
                  )[0][0]
      self.global_std.assign(std, session)
      return std
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  import pickle
  import tensorflow.compat.v1
label_desc: Use image node_id 15 for calling the ImagePreprocessing obj's underlying member method code with example usage: obj._compute_global_std(dataset, session, limit) and returns: std