How to get the dot product of 1d and 2d tensors?

When I do `tensor_vec.dot(tensor_scalar)`

I get:

```
RuntimeError: inconsistent tensor size, expected tensor [2 x 1] and src [1] to have the same number of elements, but got 2 and 1 elements respectively
```

How to get the dot product of 1d and 2d tensors?

When I do `tensor_vec.dot(tensor_scalar)`

I get:

```
RuntimeError: inconsistent tensor size, expected tensor [2 x 1] and src [1] to have the same number of elements, but got 2 and 1 elements respectively
```

Would `tensor_vec.dot(tensor_scalar.expand_as(tensor_vec))`

work?

Yes, Thank you!