Add different size of the tensor

x1.size()-> torch.Size([128, 512])
x2.size()-> torch.Size([128, 476])

x = torch.add(x1, x2)

RuntimeError: The size of tensor a (512) must match the size of tensor b (476) at non-singleton dimension 1

You cannot directly add two differently shapes tensors, which contain a different number of elements, as the addition would be performed elementwise.
Could you explain how these two tensors should be added theoretically?
To illustrate your idea, you could lower the shapes to e.g. [2, 3] and [2, 4] to explain it easier.