Seems to work for me:
In [1]: import torch

In [2]: x = torch.randn(1, 25, 256)

In [3]: y = torch.randn(1, 1, 256)

In [4]: x + y
Out[4]:
tensor([[[ 1.4846, -1.2704, -1.5809,  ...,  0.9014, -0.8867,  0.8496],
         [ 4.1737,  2.4117, -0.0261,  ...,  0.0534, -0.5655,  0.9513],
         [ 0.3474,  0.2071, -3.2485,  ...,  0.4155, -0.6435,  1.7778],
         ...,
         [ 2.6008,  0.7829, -2.2995,  ...,  1.4929, -0.8345,  1.1157],
         [ 2.9556,  1.7386, -0.8274,  ...,  1.0852, -0.4116,  2.2215],
         [ 2.6638,  0.6301, -3.5564,  ...,  0.7788,  1.2027,  2.0694]]])


what version of pytorch are you on? Could you provide a code snippet?