zhoubolei / TRN-pytorch

Temporal Relation Networks
http://relation.csail.mit.edu/
Other
787 stars 190 forks source link

size mismatch error #50

Open parkjh688 opened 5 years ago

parkjh688 commented 5 years ago

Hi, I've found this error in another issue but my pytorch version is already higher than others. It is 1.0.

I use this script for my jester dataset.

CUDA_VISIBLE_DEVICES=0,1 python main.py jester RGB --arch BNInception --num_segments 8 --consensus_type TRNmultiscale --batch-size 6

And I got this error.

image

filipetrocadoferreira commented 5 years ago

I've this also. Thinking if it's easy to solve this version conflict

AndyStrongBoy commented 5 years ago

hi, I met the same problem. Do you solve the problem? And how? I will appreciate it if answering

alexandonian commented 5 years ago

Hi,

This is an easy fix. You just need to squeeze the singleton dimension out by calling torch.squeeze on those weights.

On Wed, May 8, 2019 at 7:21 AM AndyStrongBoy notifications@github.com wrote:

hi, I met the same problem. Do you solve the problem? And how? I will appreciate it if answering

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/metalbubble/TRN-pytorch/issues/50#issuecomment-490448271, or mute the thread https://github.com/notifications/unsubscribe-auth/ADGAZGUL36SM4FHDOORK2RDPUKZSZANCNFSM4HDRE6WA .

ashuezy commented 4 years ago

Please post proper code in the repo. Makes no sense to squibble around and look for solutions.

kingsman142 commented 4 years ago

Alex is correct, in general, but the issue has to do with torch versions and there's no way for you to just easily "squeeze" the singleton dimension without a lot of bruteforce code. I installed torch 0.3.1 and torchvision 0.2.0 and it fixed the problem for me.