__init__.py 382 B

123456789101112
  1. from .build import build_loader as _build_loader
  2. from .data_simmim_pt import build_loader_simmim
  3. from .data_simmim_ft import build_loader_finetune
  4. def build_loader(config, simmim=False, is_pretrain=False):
  5. if not simmim:
  6. return _build_loader(config)
  7. if is_pretrain:
  8. return build_loader_simmim(config)
  9. else:
  10. return build_loader_finetune(config)