I have a vector atten and a tensor feat. The shapes are:
>>> atten.shape
torch.Size([1, 13])
>>> feat.shape
torch.Size([13, 1024, 7, 7])

I want to do below calculation:
sum_i(atten[0][i] * feat[i])
I tried torch.matmul or * directly, but it didn’t work. Does anybody know how to make it right?