Creates a Python Class that internally iterates over the data.
make_generator_from_task(
task,
x_transform = NULL,
y_transform = NULL,
generator = keras::image_data_generator(),
batch_size = 32L,
shuffle = TRUE,
seed = 1L,
y_cols_to_categorical = TRUE,
subset = NULL,
ignore_class_split = FALSE
)
Arguments
task |
Task
Data container to iterate over.
|
x_transform |
function
Function used to transform data to a keras input format for features.
|
y_transform |
function
Function used to transform data to a keras input format for the response.
|
generator |
Python Object
A generator as e.g. obtained from keras::image_data_generator .
Used for consistent train-test splits.
|
batch_size |
integer
Batch size.
|
shuffle |
logical
Should data be shuffled?
|
seed |
integer
Set a seed for shuffling data.
|
y_cols_to_categorical |
logical
Should target be converted to one-hot representation? Defaults to TRUE .
|
subset |
character
Should samples be generated from 'training' or 'validation' set?
Only applicable together with a 'generator'.
|
ignore_class_split |
logical
Test whether all class labels appear in all splits.
|