How to define datasets#

User-defined dataset can be created simply using the class defined below by providing data_input and data_label as torch tensors. We expect in most cases this simple class would be sufficient. However, users can create more sophisticated dataset class for their own customization.

class*args: Any, **kwargs: Any)[source]#

This class provides a simple way to define client dataset for supervised learning. This is derived from so that can be loaded to Users may also create their own dataset class derived from this for more data processing steps.

An empty Dataset class is created if no argument is given (i.e., Dataset()).

  • (torch.FloatTensor) (data_input) – optional data inputs

  • (torch.Tensor) (data_label) – optional data ouputs (or labels)