Computes the element-wise (weighted) mean of the given tensors

metric_mean_tensor(..., shape = NULL, name = NULL, dtype = NULL)



Passed on to the underlying metric. Used for forwards and backwards compatibility.


(Optional) A list of integers, a list of integers, or a 1-D Tensor of type int32. If not specified, the shape is inferred from the values at the first call of update_state.


(Optional) string name of the metric instance.


(Optional) data type of the metric result.


A (subclassed) Metric instance that can be passed directly to compile(metrics = ), or used as a standalone object. See ?Metric for example usage.


MeanTensor returns a tensor with the same shape of the input tensors. The mean value is updated by keeping local variables total and count. The total tracks the sum of the weighted values, and count stores the sum of the weighted counts.

See also