Essentially steps:

1. Define the source of your inputs(X values)

2. Define how you want to split your inputs into training and validation datasets using one of the built-in mechanisms for doing so.

3. Define the source of your targets (that is your y values) and combine them with the inputs of your training and validation datasets in the form of fastai LabelList objects. LabelList subclasses the PyTorch Dataset class.

4. Add a test dataset (optional).

5. Add transforms to your LabelList objects (optional). Here you can apply data augmentation to either, or both, your inputs and targets.

6. Build PyTorch DataLoaders from the Datasets defined above and package them up into a fastai DataBunch.

Once this is done, you’ll have everything you need to train, validate, and test any PyTorch nn.Module using the fastai library. You’ll also have everything you need to later do inference on future data.

## Example

• _bunch contains the name of the class that will be used to create a DataBunch
• _processor contains a class (or a list of classes) of PreProcessor that will then be used as the default to create processor for this ItemList
• _label_cls contains the class that will be used to create the labels by default

## Reference

Donate article here