I’m not sure I understand your question properly, but you could do something like the following in PyTorch 0.2
result = A[:, :, None] * B

But I’m not sure that’s the operation you want to perform. If you write it down, I could have a better look.