Open edwardcho opened 2 years ago
This is my hypothesis: The error stems from that your images are of dimension 1 along the channels dimension. What you can do is add two channels (stack the same image along the channel axis duplicating the values you already have, R=G=B=Gray). It should work however I am not sure about performance as I have no idea on the paper or the code.
You are trying to pass an RGB image to the model, instead, apply grayscale tranformation to your data loading pipeline.
import torchvision.transforms as transforms
from torchvision.datasets import ImageFolder
transform = transforms.Compose([
transforms.Grayscale(num_output_channels=1),
transforms.ToTensor(),
transforms.Normalize([0.5], [0.5])])
dataloader = torch.utils.data.DataLoader(
ImageFolder("dataset_folder_path/",
transform=transform),
batch_size=16, shuffle=True)
Hello Sir,
I have interesting image-to-image translation. So I tried to your code using my-datasets.
My-datasets are as follows :
When start training, I met some error.
How to train on my-case (using grayscale-datam MUNIT) ?
Thanks. Edward Cho.