How can I multiply a vector along all dimensions of a 3+D tensor at once?

The title really says it all…
How can I multiply along all dimensions of a tensor when the way code is written forces me to imply a certain order. There may be other problems that I have not encountered yet as well.

Thanks in advance.

I have found the answer.

you can use torch.einsum() to do pretty much anything.