-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Regarding the unsupported operand type error #42
Comments
maxbe you are not using the right version of torchvision? try |
Thanks @kabrio. It should work. git clone https://github.com/pytorch/vision
cd vision
python setup.py install |
I have the same problem but i got this message when I tried to download pyTorch:
It looks like I have the last pyTorch version but Is till get the same error. Did you guys soleved just by installing the last pyTorch version? |
You need to install the latest torch vision library from the source. git clone https://github.com/pytorch/vision
cd vision
python setup.py install |
Hi.
I've been using the torch based CycleGAN and Pix2pix code for a while and I think it's a great work.
The paper is also astonishing.
Now I want to move to the PyTorch based CycleGan/Pix2pix code.
But I have an error in my environment.
My environment is
-Ubuntu 14.04
-Python 2.7
-CUDA 8
and the error message is attached below.
As far as I remember the PyTorch based code worked OK in my environment.
I guess this problem might be caused by my environment settings and it might be fixed easily.
But I don't have any clue to fix this.
Could you give any tips for this issue?
< Error message>
python train.py --dataroot ./datasets/maps --name maps_cyclegan --model cycle_gan
...
...
...
model [CycleGANModel] was created
create web directory ./checkpoints/maps_cyclegan/web...
Traceback (most recent call last):
File "train.py", line 20, in
for i, data in enumerate(dataset):
File "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 212, in next
return self._process_next_batch(batch)
File "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 239, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
TypeError: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/torch/utils/data/dataloader.py", line 41, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/media/illusion/ML_DATA_SSD_M550/pytorch-CycleGAN-and-pix2pix/data/unaligned_dataset.py", line 46, in getitem
A_img = self.transform(A_img)
File "/usr/local/lib/python2.7/dist-packages/torchvision/transforms.py", line 29, in call
img = t(img)
File "/usr/local/lib/python2.7/dist-packages/torchvision/transforms.py", line 139, in call
ow = int(self.size * w / h)
TypeError: unsupported operand type(s) for /: 'list' and 'int'
The text was updated successfully, but these errors were encountered: