Hello, Thank you your code.
I have some problem like :
Traceback (most recent call last):
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\main.py", line 156, in train_loop
(images_uw, images_us), _ = unlabeled_iter.next()
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data\dataloader.py", line 517, in next
data = self._next_data()
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data\dataloader.py", line 1199, in _next_data
return self._process_data(data)
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data\dataloader.py", line 1225, in _process_data
data.reraise()
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch_utils.py", line 429, in reraise
raise self.exc_type(msg)
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data_utils\worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\data.py", line 180, in getitem
img = self.transform(img)
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\data.py", line 159, in call
aug = self.aug(x)
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torchvision\transforms\transforms.py", line 60, in call
img = t(img)
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\augmentation.py", line 211,
in call
img = op(img, v=self.m, max_v=max_v, bias=bias)
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\augmentation.py", line 165,
in TranslateYConst
return img.transform(img.size, PIL.Image.AFFINE, (1, 0, 0, 0, 1, v), RESAMPLE_MODE)
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\PIL\Image.py",
line 2490, in transform
im.__transformer(
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\PIL\Image.py",
line 2556, in __transformer
raise ValueError(
ValueError: Unknown resampling filter (None). Use Image.NEAREST (0), Image.BILINEAR (2) or Image.BICUBIC (3)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\main.py", line 633, in
main()
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\main.py", line 626, in main
train_loop(args, labeled_loader, unlabeled_loader, test_loader,
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\main.py", line 162, in train_loop
(images_uw, images_us), _ = unlabeled_iter.next()
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data\dataloader.py", line 517, in next
data = self._next_data()
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data\dataloader.py", line 1199, in _next_data
return self._process_data(data)
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data\dataloader.py", line 1225, in _process_data
data.reraise()
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch_utils.py", line 429, in reraise
raise self.exc_type(msg)
ValueError: Caught ValueError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data_utils\worker.py", line 202, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\data.py", line 180, in getitem
img = self.transform(img)
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\data.py", line 159, in call
aug = self.aug(x)
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\torchvision\transforms\transforms.py", line 60, in call
img = t(img)
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\augmentation.py", line 211,
in call
img = op(img, v=self.m, max_v=max_v, bias=bias)
File "C:\Users\user\Desktop\Pyler\MPL-pytorch\augmentation.py", line 111,
in ShearX
return img.transform(img.size, PIL.Image.AFFINE, (1, v, 0, 0, 1, 0), RESAMPLE_MODE)
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\PIL\Image.py",
line 2490, in transform
im.__transformer(
File "C:\Users\user\anaconda3\envs\pyler\lib\site-packages\PIL\Image.py",
line 2556, in __transformer
raise ValueError(
ValueError: Unknown resampling filter (None). Use Image.NEAREST (0), Image.BILINEAR (2) or Image.BICUBIC (3)
Something wrong happend.
I think it is because of pytorch version. My Pytorch version is 1.8.0. How can I fix it?
Thank you