BottleneckTransformers icon indicating copy to clipboard operation
BottleneckTransformers copied to clipboard

error abou model.py_forward

Open CarlBhy opened this issue 3 years ago • 2 comments

File "/home/sc/carl_test/BottleneckTransformers-main/model.py", line 43, in forward energy = content_content + content_position RuntimeError: The size of tensor a (4) must match the size of tensor b (196) at non-singleton dimension 1

Hi ! when run the model.py i meet this error

CarlBhy avatar Mar 08 '21 09:03 CarlBhy

Thanks for comments.

Could you plz show me your input shape?

leaderj1001 avatar Mar 12 '21 10:03 leaderj1001

RuntimeError: The size of tensor a (4) must match the size of tensor b (196) at non-singleton dimension 2

I'm using your code. And I didn't make any changes

YePG avatar Apr 16 '21 05:04 YePG