CSAILVision / places365

The Places365-CNNs for Scene Classification
http://places2.csail.mit.edu/
MIT License
1.9k stars 534 forks source link

TypeError: unsupported operand type(s) for /: 'tuple' and 'int' #40

Closed oddmen closed 6 years ago

oddmen commented 6 years ago

why run the run_placesCNN_unified.py show this error.

Traceback (most recent call last): File "/home/xyx/Downloads/places365 new/run_placesCNN_unified.py", line 132, in input_img = V(tf(img).unsqueeze(0), volatile=True) File "/home/xyx/anaconda2/lib/python2.7/site-packages/torchvision/transforms.py", line 29, in call img = t(img) File "/home/xyx/anaconda2/lib/python2.7/site-packages/torchvision/transforms.py", line 139, in call ow = int(self.size * w / h) TypeError: unsupported operand type(s) for /: 'tuple' and 'int'

zhoubolei commented 6 years ago

That's relevant to a compatibility bug in torchvision and the latest torch. You need to upgrade torchvision.

Sent from my iPhone

On Dec 25, 2017, at 10:55 PM, oddmen notifications@github.com wrote:

why run the run_placesCNN_unified.py show this error.

Traceback (most recent call last): File "/home/xyx/Downloads/places365 new/run_placesCNN_unified.py", line 132, in input_img = V(tf(img).unsqueeze(0), volatile=True) File "/home/xyx/anaconda2/lib/python2.7/site-packages/torchvision/transforms.py", line 29, in call img = t(img) File "/home/xyx/anaconda2/lib/python2.7/site-packages/torchvision/transforms.py", line 139, in call ow = int(self.size * w / h) TypeError: unsupported operand type(s) for /: 'tuple' and 'int'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.