Solved by glaringlee in post #2 
              
              
                @Hiperdyne19012 
You can just use operator * 
eg. torch::Tensor a = torch::tensor(2, 3, 4) 
torch::Tensor b = torch::tensor(2, 3, 4) 
torch c = a * b; 
c will be [4, 9, 16]