Calculates the multiplication of two tensors.