コード例 #1
0
ファイル: base.py プロジェクト: human2b/CenterHMR
 def _create_single_data_loader(self, **kwargs):
     print('gathering datasets')
     datasets = SingleDataset(**kwargs)
     return DataLoader(dataset = datasets,\
         batch_size = self.batch_size if kwargs['train_flag'] else self.val_batch_size,\
         shuffle = True if kwargs['train_flag'] else False,drop_last = False, pin_memory = True,num_workers = self.nw)
コード例 #2
0
 def _create_single_data_loader(self, **kwargs):
     logging.info('gathering datasets')
     datasets = SingleDataset(**kwargs)
     return DataLoader(dataset = datasets, shuffle = False,batch_size = self.val_batch_size,\
             drop_last = False if self.eval else True, pin_memory = True, num_workers = self.nw)