docstr: Args:
          save_path: `str`
          validation_set: `bool`.
          validation_split: `int` or None
                  float: chunk of `train set` will be marked as `validation set`.
                  None: if 'validation set' == True, `validation set` will be
                          copy of `test set`
          shuffle: `bool`, should shuffle data or not
          normalization: `str` or None
                  None: no any normalization
                  divide_255: divide all pixels by 255
                  divide_256: divide all pixels by 256
                  by_chanels: substract mean of every chanel and divide each
                          chanel data by it's standart deviation
          one_hot: `bool`, return lasels one hot encoded
docstr_tok: ["Args",":","save_path",":","`","str","`","validation_set",":","`","bool","`",".","validation_split",":","`","int","`","or","None","float",":","chunk","of","`","train","set","`","will","be","marked","as","`","validation","set","`",".","None",":","if","'validation","set","'","==","True",",","`","validation","set","`","will","be","copy","of","`","test","set","`","shuffle",":","`","bool","`",",","should","shuffle","data","or","not","normalization",":","`","str","`","or","None","None",":","no","any","normalization","divide_255",":","divide","all","pixels","by","255","divide_256",":","divide","all","pixels","by","256","by_chanels",":","substract","mean","of","every","chanel","and","divide","each","chanel","data","by","it","'s","standart","deviation","one_hot",":","`","bool","`",",","return","lasels","one","hot","encoded"]
code: def __init__(
      self,
      save_path=None,
      validation_size=None,
      shuffle=False,
      normalization=None,
      one_hot=True,
      include_extra=True,
      **kwargs,
  ):
      """
      Args:
              save_path: `str`
              validation_set: `bool`.
              validation_split: `int` or None
                      float: chunk of `train set` will be marked as `validation set`.
                      None: if 'validation set' == True, `validation set` will be
                              copy of `test set`
              shuffle: `bool`, should shuffle data or not
              normalization: `str` or None
                      None: no any normalization
                      divide_255: divide all pixels by 255
                      divide_256: divide all pixels by 256
                      by_chanels: substract mean of every chanel and divide each
                              chanel data by it's standart deviation
              one_hot: `bool`, return lasels one hot encoded
      """
      self._save_path = save_path
      train_images = []
      train_labels = []
      if include_extra:
          train_data_src = ["train", "extra"]
      else:
          train_data_src = ["train"]
      for part in train_data_src:
          images, labels = self.get_images_and_labels(part, one_hot)
          train_images.append(images)
          train_labels.append(labels)
      train_images = np.vstack(train_images)
      if one_hot:
          train_labels = np.vstack(train_labels)
      else:
          train_labels = np.hstack(train_labels)
      if validation_size is not None:
          np.random.seed(DataProvider._SEED)
          rand_indexes = np.random.permutation(train_images.shape[0])
          valid_indexes = rand_indexes[:validation_size]
          train_indexes = rand_indexes[validation_size:]
          valid_images, valid_labels = (
              train_images[valid_indexes],
              train_labels[valid_indexes],
          )
          train_images, train_labels = (
              train_images[train_indexes],
              train_labels[train_indexes],
          )
          self.validation = SVHNDataSet(
              valid_images, valid_labels, False, normalization
          )
  
      self.train = SVHNDataSet(
          train_images, train_labels, shuffle, normalization
      )
  
      test_images, test_labels = self.get_images_and_labels(
          "test", one_hot
      )
      self.test = SVHNDataSet(
          test_images, test_labels, False, normalization
      )
  
      if validation_size is None:
          self.validation = self.test
  
file_path: auptimizer/Examples/cai_eas/eas/data_providers/svhn.py
imports: import tempfile
  import os
  import scipy.io
  import numpy
  from data_providers.base_provider import ImagesDataSet, DataProvider
  from data_providers.downloader import download_data_url
label_desc: Use image node_id 1 to create a new SVHNDataProvider object from inherited base classes: DataProvider with example: obj = SVHNDataProvider(save_path, validation_size, shuffle, normalization, one_hot, include_extra)