How to replace Tensor.cmul functionality

How can I multiply two 2d tensors(matrices). torch.Tensor.cmul is not implemented. There is addcmul, but I am not sure how to use it for this, without generating dummy variables.

1 Like

I think that you can just use * such as:

a = torch.range(0, 99).view(10, 10)
b = torch.range(0, 99).view(10, 10)
c = a * b
2 Likes

Also, functionality of cmul is now merged into mul - you can use it both with tensors and scalars.

3 Likes