def _variance(self, sums, squares):
    'Calculate the variance for each row of the input tensors.\n\n    Variance is V = E[x^2] - (E[x])^2.\n\n    Args:\n      sums: A tensor containing output sums, usually a slice from\n        variables.node_sums.  Should contain the number of examples seen\n        in index 0 so we can calculate expected value.\n      squares: Same as sums, but sums of squares.\n\n    Returns:\n      A 1-D tensor of the variances for each row in the input.\n    '
    total_count = array_ops.slice(sums, [0, 0], [(- 1), 1])
    e_x = (sums / total_count)
    e_x2 = (squares / total_count)
    return math_ops.reduce_sum((e_x2 - math_ops.square(e_x)), 1)
Calculate the variance for each row of the input tensors.

Variance is V = E[x^2] - (E[x])^2.

Args:
  sums: A tensor containing output sums, usually a slice from
    variables.node_sums.  Should contain the number of examples seen
    in index 0 so we can calculate expected value.
  squares: Same as sums, but sums of squares.

Returns:
  A 1-D tensor of the variances for each row in the input.
def _variance(self, sums, squares):
    'Calculate the variance for each row of the input tensors.\n\n    Variance is V = E[x^2] - (E[x])^2.\n\n    Args:\n      sums: A tensor containing output sums, usually a slice from\n        variables.node_sums.  Should contain the number of examples seen\n        in index 0 so we can calculate expected value.\n      squares: Same as sums, but sums of squares.\n\n    Returns:\n      A 1-D tensor of the variances for each row in the input.\n    '
    total_count = array_ops.slice(sums, [0, 0], [(- 1), 1])
    e_x = (sums / total_count)
    e_x2 = (squares / total_count)
    return math_ops.reduce_sum((e_x2 - math_ops.square(e_x)), 1)