DREAM icon indicating copy to clipboard operation
DREAM copied to clipboard

Tensor shape is mis-matched

Open DavisMeee opened this issue 1 year ago • 2 comments

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

DavisMeee avatar Jan 26 '24 10:01 DavisMeee

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?

song-wensong avatar Feb 05 '24 12:02 song-wensong

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.

DavisMeee avatar Feb 05 '24 14:02 DavisMeee