a = torch.randn(3) # (3,) b = torch.randn(3, 1) # (3, 1) c = a - b print(c.shape) # (3, 3) <-- probably wrong!