vae.Dataset

class vae.Dataset(*arrays, batch_size, shuffle=False, to_dense=True)

Class for generating data mini-batches

Parameters:
*arrays

Variable length argument list containing array-like objects or sparse matrices with the same size for their first dimension.

batch_size : int

The default batch size.

shuffle : bool, optional (default=False)

Whether to shuffle the data before generating batches.

to_dense : bool, optional (default=True)

Whether to convert sparse matrices to dense NumPy arrays.

Raises:
ValueError

When no data arrays are provided, or when the input arrays do not have the same number of elements.

Attributes:
n_arrays

int: Number of arrays in the dataset

n_samples

int: Number of samples in the dataset

Methods

reset() Reset the dataset and re-shuffle the data, if necessary
n_arrays

int: Number of arrays in the dataset

n_samples

int: Number of samples in the dataset

reset()

Reset the dataset and re-shuffle the data, if necessary