v = torch.tensor([1.0, 2.0, 3.0, 4.0]) # (4,) m = torch.ones(3, 4) # (3, 4) print((m + v).shape) # (3, 4)