openfl.federated.data.loader.DataLoader
- class openfl.federated.data.loader.DataLoader(**kwargs)
Bases:
objectA base class used to represent a Federated Learning Data Loader.
This class should be inherited by any data loader class specific to a machine learning framework.
- Class Attributes:
None
Methods
Returns the shape of an example feature array.
Returns the data loader for inferencing data.
Returns the total number of training samples.
Returns the data loader for the training data.
Returns the total number of validation samples.
Returns the data loader for the validation data.
- get_feature_shape()
Returns the shape of an example feature array.
- Raises:
NotImplementedError – This method must be implemented by a child class.
- get_infer_loader()
Returns the data loader for inferencing data.
- Raises:
NotImplementedError – This method must be implemented by a child class.
- get_train_data_size()
Returns the total number of training samples.
- Raises:
NotImplementedError – This method must be implemented by a child class.
- get_train_loader(**kwargs)
Returns the data loader for the training data.
- Parameters:
kwargs – Additional arguments to pass to the function.
- Raises:
NotImplementedError – This method must be implemented by a child class.
- get_valid_data_size()
Returns the total number of validation samples.
- Raises:
NotImplementedError – This method must be implemented by a child class.
- get_valid_loader()
Returns the data loader for the validation data.
- Raises:
NotImplementedError – This method must be implemented by a child class.