I have *input_tensor* of shape `[batch, num_samples, num_features]`

And *attention_tensor* of shape `[batch, num_samples]`

Now I need, for every *batch*, for every *sample*, multiply elementwise value from *attention_tensor* to each *feature* value in *input_tensor* so output tensor will have shape `[batch, num_samples, num_features]`

How can I do this in Pytorch with minimum overhead?