User-defined dataset can be created simply by using the class defined below. We expect in most cases this simple class would be sufficient. However, users can create more sophisticated dataset class for their own customization.
- class appfl.misc.data.Dataset(*args: Any, **kwargs: Any)
This class provides a simple way to define client dataset for supervised learning. This is derived from
torch.utils.data.Datasetso that can be loaded to
torch.utils.data.DataLoader. Users may also create their own dataset class derived from this for more data processing steps.
Datasetclass is created if no argument is given (i.e.,
data_input (torch.FloatTensor) – optional data inputs
data_label (torch.Tensor) – optional data ouputs (or labels)
This returns a sample point for given
This returns the sample size.