torch.bmm does matrix multiplication, not element-wise multiplication, so it can’t fulfill my purpose. (*) operator with a for loop is working for me. Btw, I also tried torch.cmul() but it is not working. Can you tell me why? Its giving me the error - AttributeError: module 'torch' has no attribute 'cmul'. What I am missing?