They are all png images and they’re being loaded at the same time as the RGB images.
data_dir = 'data’
image_datasets = {}
for label in [‘input_training_lowres’, ‘gt_training_lowres’, ‘trimap_training_lowres’]:
image_datasets[label] = datasets.ImageFolder(
os.path.join(data_dir, label),
data_transforms[label]
)

dataloaders = {}
for label in [‘input_training_lowres’, ‘gt_training_lowres’, ‘trimap_training_lowres’]:
dataloaders[label] = torch.utils.data.DataLoader(
image_datasets[label], batch_size=4, shuffle=True, num_workers=4
)

dataset_sizes = {}
for label in [‘input_training_lowres’, ‘gt_training_lowres’, ‘trimap_training_lowres’]:
dataset_sizes[label] = len(image_datasets[label])

…
        for input_training, truth_training, trimap_training in zip(dataloaders['input_training_lowres'], dataloaders['gt_training_lowres'], dataloaders['trimap_training_lowres']):

            rgb_data, target = input_training
            gt_data, gt_target = truth_training
            trimap_data, trimap_target = trimap_training
            trimap_alpha = trimap_data
            ground_truth = gt_data
            inputs = torch.cat((rgb_data, trimap_alpha), 1)