kerasdfdataset
kerasdfdataset ¶
module for the KerasDfDataset class
Classes¶
KerasDfDataset ¶
Bases: DfDataset, Sequence
Keras implementation of the DfDataset
Constructor of the KerasdfDataset Args: batch_size: Batch size **kwargs: All arguments of the DfDataset
Source code in niceml/dlframeworks/keras/datasets/kerasdfdataset.py
Functions¶
__getitem__ ¶
The getitem function returns the indexed data batch in the size of self.batch_size.
It is called when the DfDataset is accessed, using the notation self[index]
(while training a model).
Args:
index: Specify index of the batch
Returns:
A batch of input data and target data with the batch size self.batch_size
Source code in niceml/dlframeworks/keras/datasets/kerasdfdataset.py
__len__ ¶
The len function is used to determine the number of batches in an epoch.
Returns:
-
–
The number of batches in an epoch
Source code in niceml/dlframeworks/keras/datasets/kerasdfdataset.py
get_batch_size ¶
The get_batch_size function returns the batch size of the dataset.
Returns:
-
int–The batch size
get_datainfo ¶
The get_datainfo function is used to get the data information for a given batch.
Parameters:
-
batch_index–Determine which batch of data (datainfo) to return
Returns:
-
List[RegDataInfo]–A list of
RegDataInfoobjects of the batch with indexbatch_index
Source code in niceml/dlframeworks/keras/datasets/kerasdfdataset.py
on_epoch_end ¶
Execute logic to be performed at the end of an epoch (e.g. shuffling the data)