T O P

RuntimeError: The size of tensor a (5) must match the size of tensor b (32) at non-singleton dimension 3

RuntimeError: The size of tensor a (5) must match the size of tensor b (32) at non-singleton dimension 3

deepgeek_01

So, as the error suggests there is a shape mismatch. It's better to look at origin of 2 tensors and trace down what all changed its shape.