DataLoader¶
Class to load data in the second stage of the pipeline
-
class
munge.DataLoader.
DataLoader
(dataset)¶ Bases:
object
DataLoader class can be instantiated with the following args
- parameters, types, return and return types:
Parameters: dataset – instance of Dataset
class-
load_train_data
(epochs=10, batch_size=8, log_file='data_loader.log')¶ Returns an array of
DataElement
instances split into batches and epochsParameters: - epochs – number of epochs needed
- batch_size – number of images to be used per batch
- log_file – path to the log_file
Returns: array of dimension epochs x (data_size/batch_size) x batch_size containing instances of
DataElement
-
static
plot_random_epoch
(data, epoch_size=10, filename=None)¶ Method to plot the images from a randomly selected epoch
Parameters: - data – return value of
load_train_data
function - epoch_size – size of epoch
- filename – file to which the plot should be saved
- data – return value of