weihaox / DREAM

[WACV 2024] DREAM: Visual Decoding from Reversing Human Visual System
https://weihaox.github.io/DREAM
MIT License
34 stars 2 forks source link

Tensor shape is mis-matched #2

Open DavisMeee opened 7 months ago

DavisMeee commented 7 months ago

clip_caps[i] = clip_text.mean(0)


RuntimeError: The expanded size of the tensor (59136) must match the existing size (768) at non-singleton dimension 0.  Target sizes: [59136].  Tensor sizes: [768]
![image](https://github.com/weihaox/DREAM/assets/61048672/0507cd36-7348-4a40-8582-3ef4d2961d97)
song-wensong commented 7 months ago

clip_caps[i] = clip_text.mean(0) ~~~~~^^^ RuntimeError: The expanded size of the tensor (59136) must match the existing size (768) at non-singleton dimension 0. Target sizes: [59136]. Tensor sizes: [768] image

Hello, have you solved this problem?

DavisMeee commented 7 months ago

clip_caps[i] = clip_text.mean(0) ~~~~~^^^ RuntimeError: The expanded size of the tensor (59136) must match the existing size (768) at non-singleton dimension 0. Target sizes: [59136]. Tensor sizes: [768] image

Hello, have you solved this problem?

LOL, I haven't tried that yet. But I think you just need to do a reshape before this.