data_utils.py
def preprocess_one_train_dataset(self, dataset):
        """preprocess a training dataset, construct a data loader.
        """
        data_path = os.path.join(self.data_dir, dataset, 'pytorch')
        data_path = os.path.join(data_path, 'train' + self.train_all)
        image_dataset = datasets.ImageFolder(data_path)

        loader = torch.utils.data.DataLoader(
            ImageDataset(image_dataset.imgs, self.data_transforms['train']), 
            batch_size=self.batch_size,
            shuffle=True, 
            num_workers=2, 
            pin_memory=False)

        return loader, image_dataset
preprocess a training dataset, construct a data loader.
        
preprocess a training dataset, construct a data loader.
preprocess a training dataset construct a data loader .
def preprocess_one_train_dataset(self, dataset):
        data_path = os.path.join(self.data_dir, dataset, 'pytorch')
        data_path = os.path.join(data_path, 'train' + self.train_all)
        image_dataset = datasets.ImageFolder(data_path)
        loader = torch.utils.data.DataLoader(
            ImageDataset(image_dataset.imgs, self.data_transforms['train']), 
            batch_size=self.batch_size,
            shuffle=True, 
            num_workers=2, 
            pin_memory=False)
        return loader, image_dataset
def preprocess_one_train_dataset ( self , dataset ) : data_path = os . path . join ( self . data_dir , dataset , 'pytorch' ) data_path = os . path . join ( data_path , 'train' + self . train_all ) image_dataset = datasets . ImageFolder ( data_path ) loader = torch . utils . data . DataLoader ( ImageDataset ( image_dataset . imgs , self . data_transforms [ 'train' ] ) , batch_size = self . batch_size , shuffle = True , num_workers = 2 , pin_memory = False ) return loader , image_dataset
preprocess a training dataset, construct a data loader.
preprocess a training dataset construct a data loader .
"""preprocess a training dataset, construct a data loader.
        """
self
dataset