loaderfactory.py 561 B

123456789101112131415161718192021
  1. ''' Document Localization using Recursive CNN
  2. Maintainer : Khurram Javed
  3. Email : kjaved@ualberta.ca '''
  4. import dataprocessor.dataloaders as loader
  5. class LoaderFactory:
  6. def __init__(self):
  7. pass
  8. @staticmethod
  9. def get_loader(type, data, transform=None, cuda=False):
  10. if type=="hdd":
  11. return loader.HddLoader(data, transform=transform,
  12. cuda=cuda)
  13. elif type =="ram":
  14. return loader.RamLoader(data, transform=transform,
  15. cuda=cuda)