Thanks your the reply  I resize the images by using:
transform = transforms.Compose([transforms.ToPILImage(),transforms.Resize((224,224)),transforms.ToTensor(), transforms.Normalize([0.5], [0.5])])

The images are 64x64 numpy arrays originally before the tranformation but they are only single channel images. I’ll take a look into the input dimensions as they should be [batch_size, 1, 224, 224] after the dataloader which looks as follows:
loader = DataLoader(FITSCubeDataset(data_path, cube_length, transforms, img_size), 
                    batch_size=batch_size, shuffle = False, sampler=train_sampler)