So i am looking for a quick and clean method to do some multiplication but i can not find a good solution.
I have a vector with the size
size() = [8,16,1,2] and would like to receive and vector of
size() = [8,16,1,1] where in the last dimension the product of the two entries is taken.
If i wanted to take the sum it would be easy using
torch.sum(x, 3) but is there a nice way to take the product?
Thanks for your help in advance!