Here is a running piece of code
class ImageDataset(data.Dataset):

def __init__(self, root_dir, num_augments=2, transform=None):
    
    self.root_dir = root_dir
    self.img_names = os.listdir(root_dir)[::600]
    self.num_augments = num_augments
    self.transform = transform
    
def __getitem__(self, index):
    
    output = []
    
    for i in range(self.num_augments):
        img_transform = torch.randn(3,224,224)
        
        output.append(img_transform)
        
    output = torch.stack(output, axis=0)
        
    return output
        
def __len__(self):
    
    return len(self.img_names)

dataset = ImageDataset(root_dir = '',
                   num_augments = 10,
                   transform = None)

train_dataset = DataLoader(dataset=dataset,
                       batch_size=5,
                       shuffle=True,
                       num_workers=0)

for i,images in enumerate(train_dataset):
    test_shape = images.shape

I believe I should be getting [5,10,3,224,224], but getting [1,10,3,224,224]