Calculates the weighted average of elements.
the input tensor
Optional
(optional) the weights for each element
the weighted average
Calculates the weighted average of elements.