Dataloader API
Dataloader Creation
- class flexflow.core.flexflow_cffi.FFModel
- create_data_loader(batch_tensor, full_array)
Create a SingleDataloader instance.
- Parameters
batch_tensor (Tensor) – a batch-sized tensor. Usually it is a input tensor of the model.
full_array (Numpy Array) – the entire data.
- Returns
SingleDataloader – returns a dataloader instance.
Use Dataloader for Training
- class flexflow.core.flexflow_cffi.SingleDataLoader
- next_batch(ffmodel)
Ask the dataloder to load the next batch to the
batch_tensor
.- Returns
None – no returns.
- reset()
Reset the current position of the dataloder to 0.
- Returns
None – no returns.