thuml / Transfer-Learning-Library

Transfer Learning Library for Domain Adaptation, Task Adaptation, and Domain Generalization
http://transfer.thuml.ai
MIT License
3.39k stars 553 forks source link

How to train on custom datasets? #188

Closed lualualualu closed 1 year ago

thucbx99 commented 1 year ago

You can refer to the implementation of datasets in our library. For example, we define ImageList as a base class on image classification task. Then we inherit ImageList class to implement specific datasets, such as Office31.

The most straightforward way to train on custom datasets is to mimic our implementation. However, this can be flexible , such as the implementation of Food101. And you may need to modify the data loading code correspondingly.