rosinality / vq-vae-2-pytorch

Implementation of Generating Diverse High-Fidelity Images with VQ-VAE-2 in PyTorch
Other
1.65k stars 275 forks source link

train_vqvae with 1 channel - error #24

Closed pythonmobile closed 4 years ago

pythonmobile commented 4 years ago

in_channel=3 -> If I pass in_channel=1, I get an error. I am trying to use it with single channel images. Anyone can help me with this use case?

RuntimeError: Expected 4-dimensional input for 4-dimensional weight 64 1 4 4, but got 3-dimensional input of size [128, 256, 256] instead

pythonmobile commented 4 years ago

I needed a unsqueeze in DataSet.