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.