User-defined dataset

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*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()).

  • data_input (torch.FloatTensor) – optional data inputs

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


This returns a sample point for given idx.


This returns the sample size.