alexandru-dinu / cae

Compressive Autoencoder.
MIT License
170 stars 31 forks source link

ValueError: not enough values to unpack (expected 3, got 2) #5

Closed tuqiangwang closed 5 years ago

tuqiangwang commented 5 years ago

Traceback (most recent call last): File "train.py", line 94, in train(args) File "train.py", line 36, in train for bi, (img, patches, _) in enumerate(dataloader): File "/home/tq/anaconda3/envs/p3.6torch0.4.1/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 314, in next batch = self.collate_fn([self.dataset[i] for i in indices]) File "/home/tq/anaconda3/envs/p3.6torch0.4.1/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 314, in batch = self.collate_fn([self.dataset[i] for i in indices]) File "/home/tq/nets/cae/image_folder.py", line 20, in getitem h, w, c = img.shape[:3] #delete [:3] ValueError: not enough values to unpack (expected 3, got 2)

alexandru-dinu commented 5 years ago

It seems that img only has 2 dimensions (h, w). Maybe you're using grayscale images?