Module Expr Str Import alias identifier Import alias identifier Import alias identifier Import alias identifier ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Print BinOpMod Str Call NameLoad AttributeLoad NameLoad attr Print Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num If AttributeLoad NameLoad attr body Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore BinOpSub NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad BinOpAdd AttributeLoad NameLoad attr Num If AttributeLoad NameLoad attr body Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad BinOpAdd Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Num If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad Num AttributeLoad NameLoad attr NameLoad body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign NameStore Call NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args defaults body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr BinOpDiv Call NameLoad NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore BinOpMult BinOpAdd NameLoad Num NameLoad If CompareGt NameLoad NameLoad body Assign NameStore BinOpSub NameLoad BinOpMult NameLoad NameLoad orelse Assign NameStore NameLoad Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index BinOpAdd BinOpMult NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If AttributeLoad NameLoad attr body Assign NameStore BinOpSub NameLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad BinOpAdd Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Num If NameLoad body If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Num Num Num Num If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad NameLoad Slice BinOpMult NameLoad NameLoad BinOpAdd BinOpMult NameLoad NameLoad NameLoad Expr Yield TupleLoad NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Expr Yield NameLoad decorator_list Return Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad BinOpSub Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad attr AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad Num NameLoad NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore ListLoad Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad BinOpSub NameLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Return TupleLoad Call AttributeLoad NameLoad attr NameLoad keyword Num Call AttributeLoad NameLoad attr NameLoad keyword Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr Dict orelse Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
datumio.datagen
---------
Data generators used for loading datasets in mini-batches.

Generators
---------
BatchGenerator:
    Mini-batch generator for datasets that can be loaded entirely into memory
DataGenerator:
    Mini-batch generator for datasets that can't entirely fit into memory.

Idea taken from Keras's implementation: Keras.preprocessing.image.py
 N/A numpy np N/A transforms dtf N/A buffering dtb N/A data_utils dtu InstantiateError N/A Exception N/A N/A Raise error if base class was not peroperly instantiated by its
    super class __init__ N/A N/A self msg N/A N/A N/A N/A self msg msg N/A __str__ N/A N/A self N/A N/A N/A N/A repr N/A self msg N/A N/A BaseGenerator N/A object N/A N/A Abstract base generator class.

    See `BatchGenerator` for parameter descriptions.
     __init__ N/A N/A self X y aug_params rng_aug_params dataset_zmuv dataset_axis batch_zmuv batch_axis sample_zmuv sample_axis N/A None None None False None False None False None N/A N/A N/A self aug_params aug_params N/A N/A self rng_aug_params rng_aug_params N/A N/A self dataset_zmuv dataset_zmuv N/A N/A self dataset_axis dataset_axis N/A N/A self batch_zmuv batch_zmuv N/A N/A self batch_axis batch_axis N/A N/A self sample_zmuv sample_zmuv N/A N/A self sample_axis sample_axis N/A N/A self X N/A N/A np array X N/A N/A y None N/A N/A N/A self y N/A N/A np array y N/A N/A N/A self y None N/A N/A self mean None N/A N/A self std None N/A N/A self tf None N/A N/A self greyscale False N/A input_shape N/A N/A self N/A N/A N/A Get shape of input data based on first data in X N/A N/A N/A np shape N/A N/A self data_loader N/A N/A self X N/A 0 N/A self dl_kwargs N/A property resample_dataset N/A N/A self arr weights sample_fraction rng_seed N/A 1.0 None N/A N/A Resamples unbalanaced dataset according to labels in `arr` and
        `weights`. This modifies self.X and self.y.

        Parameters
        -------
        arr: array-like, shape = [n_samples] or [n_samples, outputs]
            Array of labels/class/group to balance.

        class_weight: dict, list of dicts, "balanced", or None, optional
            Weights associated with `arr` in the form ``{label: weight}``,
            where the keys `label` are unique values present in arr and
            weights are the percentage of which to sample. If not given, all
            classes are set to weights of 1. For multi-output problems, a list
            of dicts can be provided in the same order as the columns of y.


            The "balanced" mode uses the values of y to automatically adjust
            weights inversely proportional to class frequencies in the data.


            For multi-output, the weights of each column of y will be
            multiplied.

        sample_fraction: float, default=1.0
            Fraction of len(arr) to return when resampling dataset.
            For example, if `sample_fraction=2.0`, will return arr of
            ``len(2*len(arr))``.

        rng_seed: int, default=None
            Seed to random state that uses np.choice to select idxs of samples.

        Returns
        -------
        idxs: ndarray, shape = (sample_fraction * len(arr))
            Resampled indices of arr according to weights.
            Will apply: self.X = self.X[idxs]
                        self.y = self.y[idxs]
         N/A idxs N/A N/A dtu resample_data arr weights sample_fraction sample_fraction rng_seed rng_seed N/A N/A self X N/A N/A self X N/A idxs N/A N/A self y N/A N/A self y N/A idxs N/A N/A [datumio] resampling dataset to len(X) = %s N/A len N/A self X N/A [datumio] ... Note: This is sampled with replacement. An epoch no longer means a pass through the dataset. N/A idxs N/A set_actions N/A N/A self N/A N/A N/A Set generator processing stream actions: dataset_zmuv, static aug

        All other actions are implied from initialization:
            - batch_zmuv
            - sample_zmuv
            - rng_aug_params
         N/A input_shape N/A N/A self input_shape N/A 2 N/A N/A self dataset_zmuv N/A N/A N/A N/A self mean N/A self std N/A N/A self compute_dataset_moments N/A N/A N/A self aug_params None N/A N/A N/A self warp_kwargs N/A N/A N/A self aug_params pop warp_kwargs None N/A N/A self tf N/A N/A dtf build_augmentation_transform input_shape N/A self aug_params N/A N/A self output_shape N/A N/A N/A self aug_params pop output_shape None N/A N/A N/A len N/A self input_shape 2 N/A N/A N/A self greyscale True N/A standardize N/A N/A self x N/A N/A N/A Applies generator processing to a loaded data x:
            - dataset zmuv
            - sample zmuv
            - static augmentation
            - rng augmentation

        Batch augmentations are done after loading a batch
         N/A N/A N/A N/A self mean None N/A N/A self std None N/A N/A x N/A x N/A self mean N/A x N/A x N/A N/A self std 1e-12 N/A N/A self sample_zmuv N/A N/A x N/A x N/A N/A np mean x axis N/A self sample_axis N/A x N/A x N/A N/A N/A np std x axis N/A self sample_axis 1e-12 N/A N/A N/A self tf None N/A N/A x N/A N/A dtf transform_image x output_shape N/A self output_shape tf N/A self tf warp_kwargs N/A self warp_kwargs N/A N/A N/A self rng_aug_params None N/A N/A x N/A N/A dtf perturb_image x N/A self rng_aug_params N/A x N/A get_batch N/A N/A self batch_size shuffle rng_seed buffer_size dtype chw_order N/A 32 False None 2 N/A np float32 False N/A N/A Buffered generator. Returns minibatches of dataset (X, y) w/
        real-time augmentations applied on-the-fly. If y is not provided,
        get_batch will only return minibatches of X.

        Parameters
        ---------
        batch_size: int, default=32
            Size of minibatches to extract from X. If X % batch_size != 0,
            then the last batch returned the remainder, X % batch_size.

        shuffle: bool, default=False
            Whether to shuffle X and y before generating minibatches.

        rng_seed: int, default=None
            Seed to random state that shuffles X,y (if `shuffle=true`).

        buffer_size: int, default=2
            Size of to load in the buffer with each call.

        dtype: np.dtype, default=np.dtype32
            Data type of minibatch to be returned.

        chw_order: bool, default=False
            Return shape of minibatch. If False, minibatch returns will be of
            shape (batch_size, height, width, channel). If True, minibatches
            will be return of shape (batch_size, channel, height, width)

        Yield
        ---------
        ret: tuple OR ndarray
            If y is None (supplied at initialization of generator), returns
            minibatch of X with shape depending on `chw_order`.

            If y is initialized, returns tuple (mb_x, mb_y), where mb_x
            is minibatch of X and mb_y is minibatch of y wit shape
            depending on `chw_order`.
         N/A ndata N/A len N/A self X N/A N/A rng_seed None N/A N/A rng N/A np random N/A N/A rng N/A N/A N/A np random RandomState seed rng_seed N/A idxs N/A range ndata N/A shuffle N/A N/A N/A N/A rng shuffle idxs gen_batch N/A N/A N/A N/A N/A nb_batch N/A int N/A N/A np ceil N/A N/A float ndata batch_size N/A b N/A range nb_batch N/A N/A batch_end N/A N/A b 1 batch_size N/A N/A batch_end ndata N/A N/A nb_samples N/A ndata N/A b batch_size N/A N/A nb_samples batch_size N/A bX N/A N/A i N/A xrange nb_samples N/A N/A idx N/A idxs N/A N/A N/A b batch_size i N/A x N/A N/A np array N/A N/A self data_loader N/A N/A self X N/A idx N/A self dl_kwargs dtype N/A np float32 N/A x N/A N/A self standardize x N/A N/A N/A bX append x N/A bX N/A N/A np array bX dtype dtype N/A N/A self batch_zmuv N/A N/A bX N/A bX N/A N/A bX mean axis N/A self batch_axis N/A bX N/A bX N/A N/A N/A bX std axis N/A self batch_axis 1e-12 N/A chw_order N/A N/A N/A self greyscale N/A N/A bX N/A N/A np expand_dims bX 3 N/A bX N/A N/A bX transpose 0 3 1 2 N/A N/A N/A self y None N/A N/A bslice N/A idxs N/A N/A b batch_size N/A N/A b batch_size nb_samples N/A N/A N/A bX N/A N/A self y N/A bslice N/A N/A N/A bX N/A N/A N/A N/A dtb buffered_gen_threaded N/A gen_batch buffer_size buffer_size N/A compute_dataset_moments N/A N/A self N/A N/A N/A Computes mean, std of dataset.

        Returns
        ------
        (mean, std): tuple
            Of floats or ndarrays (if computation is done on axis != None)
         N/A N/A InstantiateError compute_dataset_moments not instantiated N/A set_data_loader N/A N/A self N/A N/A N/A Sets data_loader for generator. For BatchGenerator, returns itself.
        For DataGenerator, user defines a function that loads in their data.

        Function should set the following properties
        ------
        self.data_loader: func
            Python function that loads objects of X to return data.

        self.dl_kwargs: dict
            Keyword arguments to `self.data_loader`. If no kwargs are required,
            set dl_kwargs = {}

        Returns
        ------
        None
         N/A N/A InstantiateError set_data_loader not instantiated N/A N/A BatchGenerator N/A BaseGenerator N/A N/A Batch generator with realtime data augmentation.
    Requires loading the dataset onto memory beforehand.

    Parameters
    ------
    X: iterable, ndarray
        Dataset to generate batch from.
        X.shape must be (dataset_length, height, width, channels)

    y: iterable, ndarray, default=None
        Corresponding labels to dataset. If label is None, get_batch will
        only return minibatches of X. y.shape = (data, ) or
        (data, one-hot-encoded)

    dataset_zmuv: bool, default=False
        Subtracts mean and divides by std of entire dataset on each sample x.

    dataset_axis: None or int or tuple of ints, optional
        Axis or axes along which dataset mean,std are computed. See `np.mean`
        axis option. If dataset_zmuv=False, this does not matter.

    batch_zmuv: bool, default=False
        Subtracts mean and divides by std within each minibatch load on each
        sample x.

    batch_axis: None or int or tuple of ints, optional
        Axis or axes along which batch mean,std are computed. See `np.mean`
        axis option. If batch_zmuv=False, this does not matter.

    sample_zmuv: bool, default=False
        Subtracts mean and divides by std of x on itself.

    sample_axis: None or int or tuple of ints, optional
        Axis or axes along which sample_mean,std are computed. See `np.mean`
        axis option. If sample_zmuv=False, this does not matter.

    Examples
    ------
    X # array of loaded images of shape (100, 32, 32, 3)

    BatchGen = BatchGenerator(X, shuffle=True, dataset_zmuv=True)
    for mb_x in BatchGen.get_batch():
        # do something with mb_x, a minibatch load from X with on-the-fly
        # augmentations/zmuv
        pass

    See `examples/cifar10_cnn_batchgen.py` for more thorough example.
     __init__ N/A N/A self X y aug_params rng_aug_params dataset_zmuv dataset_axis batch_zmuv batch_axis sample_zmuv sample_axis N/A None None None False None False None False None N/A N/A kwargs N/A locals N/A N/A self kwargs N/A N/A N/A N/A kwargs pop self N/A N/A N/A self set_data_loader N/A N/A N/A N/A super BatchGenerator self __init__ kwargs N/A N/A N/A self set_actions N/A compute_dataset_moments N/A N/A self N/A N/A N/A Compute mean and std of entire dataset N/A mean N/A N/A N/A N/A N/A self X astype N/A np float32 mean N/A self dataset_axis N/A std N/A N/A N/A N/A N/A N/A self X astype N/A np float32 mean std N/A self dataset_axis N/A N/A mean std N/A set_data_loader N/A N/A self N/A N/A N/A Set data_loader for generator. This is handled for generality.
        For BatchGenerator, this returns itself data_loader N/A N/A x N/A N/A N/A x N/A N/A N/A self data_loader data_loader N/A N/A self dl_kwargs N/A N/A N/A DataGenerator N/A BaseGenerator N/A N/A Batch generator with realtime data augmentation. Data is loaded
    and augmented on-the-fly.

    Parameters
    ------
    X: iterable, ndarray
        Path to each data file within a dataset. Each sample of X is loaded
        using `data_loader`.
        X.shape must be (dataset_length, )

    y: iterable, ndarray, default=None
        Corresponding labels to dataset. If label is None, get_batch will
        only return minibatches of X. y.shape = (data, ) or
        (data, one-hot-encoded)

    data_loader: func, default=dtu.img_loader
        Function used for loading each sample of `X`. Default loader,
        `dtu.img_loader` is a generic function that loads standard img
        files (png, jpg, tifs, etc) and npy arrays (in the shape of an image)

    dl_kwargs: dict, default=None
        Keyword arguments to pass to `data_loader` when loading samples of X.
        If None, no kwargs will passed to data_loader.

    dataset_zmuv: bool, default=False
        Subtracts mean and divides by std of entire dataset on each sample x.

    dataset_axis: None or int or tuple of ints, optional
        Axis or axes along which dataset mean,std are computed. See `np.mean`
        axis option. If dataset_zmuv=False, this does not matter.

    dataset_zmuv_bsize: int, default=32
        If dataset_zmuv == True, this is the size of minibatches to load per
        yield to compute the dataset mean and std for zero-mean unit variance.

    batch_zmuv: bool, default=False
        Subtracts mean and divides by std within each minibatch load on each
        sample x.

    batch_axis: None or int or tuple of ints, optional
        Axis or axes along which batch mean,std are computed. See `np.mean`
        axis option. If batch_zmuv=False, this does not matter.

    sample_zmuv: bool, default=False
        Subtracts mean and divides by std of x on itself.

    sample_axis: None or int or tuple of ints, optional
        Axis or axes along which sample_mean,std are computed. See `np.mean`
        axis option. If sample_zmuv=False, this does not matter.

    Examples
    ------
    X # path images of shape (100,)

    DataGen = DataGenerator(X, shuffle=True, dataset_zmuv=True)
    for mb_x in DataGen.get_batch():
        # do something with mb_x, a minibatch load from X with on-the-fly
        # augmentations/zmuv
        pass

    See `examples/cifar10_cnn_datagen.py` for more thorough example.
     __init__ N/A N/A self X y data_loader dl_kwargs aug_params rng_aug_params dataset_zmuv dataset_axis dataset_zmuv_bsize batch_zmuv batch_axis sample_zmuv sample_axis N/A None N/A dtu img_loader None None None False None 32 False None False None N/A N/A kwargs N/A locals N/A N/A self kwargs N/A N/A N/A N/A kwargs pop self N/A N/A self dataset_zmuv_bsize N/A N/A kwargs pop dataset_zmuv_bsize N/A data_loader N/A N/A kwargs pop data_loader N/A dl_kwargs N/A N/A kwargs pop dl_kwargs N/A N/A N/A self set_data_loader data_loader dl_kwargs N/A N/A N/A N/A super DataGenerator self __init__ kwargs N/A N/A N/A self set_actions N/A compute_dataset_moments N/A N/A self N/A N/A N/A Compute mean and std of entire dataset by taking the average
        of the mean and std of loaded minibatches. Each minibatch (whose
        size is equal to initialized batch_size) is loaded using
        get_batch, with augmentations and zmuv computations turned off N/A tf N/A self tf N/A rng_aug_params N/A self rng_aug_params N/A batch_zmuv N/A self batch_zmuv N/A sample_zmuv N/A self sample_zmuv N/A N/A self tf None N/A N/A self rng_aug_params None N/A N/A self batch_zmuv False N/A N/A self sample_zmuv False N/A batches_mean N/A N/A batches_std N/A N/A ret N/A N/A self get_batch batch_size N/A self dataset_zmuv_bsize N/A N/A N/A N/A self y None N/A N/A mb_x ret N/A N/A mb_x N/A ret N/A 0 N/A mean N/A N/A mb_x mean axis N/A self dataset_axis N/A std N/A N/A N/A mb_x mean std axis N/A self dataset_axis N/A N/A N/A batches_mean append mean N/A N/A N/A batches_std append std N/A N/A self tf tf N/A N/A self rng_aug_params rng_aug_params N/A N/A self batch_zmuv batch_zmuv N/A N/A self sample_zmuv sample_zmuv N/A N/A N/A N/A np mean batches_mean axis 0 N/A N/A np mean batches_std axis 0 N/A set_data_loader N/A N/A self data_loader dl_kwargs N/A N/A N/A Set data_loader for generator to load each sample of X into
        data that can be augmented N/A N/A self data_loader data_loader N/A N/A dl_kwargs None N/A N/A N/A self dl_kwargs N/A N/A N/A N/A self dl_kwargs dl_kwargs N/A N/A