For example, I have a list of N
B x H
tensor(i.e. a N x B x H
tensor) and a list of N
vectors (i.e. N x B
tensor). And I want multiply each B x H
tensor in the list with corresponding B
dimensional tensor, resulting a N x H
tensor.
I know how to use a single for-loop
with PyTorch to implement the computation, but is there any vectorised implantation? (i.e. no for-loop
, just using PyTorch/numpy operations)