In MMSelfSup, we mainly focus on the data flow between dataloader and model, and between model and visualizer. As for the
data flow between model and metric, please refer to the docs in other repos, e.g. [MMClassification](https://github.com/open-mmlab/mmclassification).
Also for data flow between model and visualizer, you can refer to [visualization](../user/guides/visualization.md)
## Data flow between dataloader and model
The data flow between dataloader and model can be generally split into three parts, i) use `PackSelfSupInputs` to pack
data from previous transformations into a dictionary, ii) use `collate_fn` to stack a list of tensors into a batched tensor,
iii) data preprocessor will move all these data to target device, e.g. GPUS, and unzip the dictionary from the dataloader
into a tuple, containing the input images and meta info (`SelfSupDataSample`).
### Data from dataset
In MMSelfSup, before feeding into the model, data should go through a series of transformations, called `pipeline`, e.g. `RandomResizedCrop` and `ColorJitter`. No matter how many transformations in the pipeline, the last transformation is `PackSelfSupInputs`. `PackSelfSupInputs` will
pack these data from previous transformations into a dictionary. The dictionary contains two parts, namely, `inputs` and `data_samples`.