Hi there,
Sorry for the stupid and elementary question!
I am totally new to Python and PyTorch.
My question is that I want to multiply a [128,10,512] tensor by a tensor with the length of 10 such that the final output to be a [128*512] tensor. I know how to do that using for loops. However, I am wondering whether there is a direct PyTorch command in this regard.
Thank you in advance for your kind help
Thank you!
That’s great.
What about if “big” is a tensor shaped [batchsize, num_windows, CNN_features], “ten” is a tensor shaped [batchsize, num_windows], and using “ten” we want to map “big” to the “result” tensor with the shape of [batchsize, CNN_features]? i.e.
big = [128,10,512]
ten = [128,10]
result = [128,512]
btw, use the </> button to add code or three backticks ``` to start and finish the thing. It just makes everything easier and clean formatting. Easier for other people to understand everything.