Serial

Warning

Documentation for the module is under development.

Serial – derived from Provider, whose task is to return a data batch from the dataset specified when creating Serial, if needed.

def __init__

__init__(self, dataset, labels=None, numofthreads=4)

Creates a Serial object.

Parameters

Parameter Allowed types Description Default
dataset np.ndarray, list Dataset that Serial will work with -
labels list Labels corresponding to the passed dataset None
numofthreads int Number of data processing threads 4

Return value

None.

def getNextChunk

getNextChunk(self, chunksize, **kwargs)

Returns a data batch sized chunksuze. The kwargs parameter specifies the parameters for constructing the data batch.

Parameters

Parameter Allowed types Description Default
chunksize int Size of the returned data batches
**kwargs dict Dictionary that can specify the parameters for constructing data batches -

Return value

A tuple of two np.ndarray – data и labels or data only, if labels were not provided when creating the Merger object.