parameters: (self, name="variance")
docstring: Variance of each batch member.
  
      Variance for inverse gamma is defined only for `alpha > 2`. If
      `self.allow_nan_stats` is `False`, an exception will be raised rather
      than returning `NaN`.
  
      Args:
        name: A name to give this op.
  
      Returns:
        The variance for every batch member, a `Tensor` with same `dtype` as self.
docstring_summary: Variance of each batch member.
docstring_tokens: Variance of each batch member .
function: def variance(self, name="variance"):
      """Variance of each batch member.
  
      Variance for inverse gamma is defined only for `alpha > 2`. If
      `self.allow_nan_stats` is `False`, an exception will be raised rather
      than returning `NaN`.
  
      Args:
        name: A name to give this op.
  
      Returns:
        The variance for every batch member, a `Tensor` with same `dtype` as self.
      """
      alpha = self._alpha
      beta = self._beta
      with ops.name_scope(self.name):
        with ops.op_scope([alpha, beta], name):
          var_if_defined = (math_ops.square(self._beta) /
                            (math_ops.square(self._alpha - 1.0) *
                             (self._alpha - 2.0)))
          if self.allow_nan_stats:
            alpha_gt_2 = alpha > 2.0
            nan = np.nan * self._ones()
            return math_ops.select(alpha_gt_2, var_if_defined, nan)
          else:
            two = constant_op.constant(2.0, dtype=self.dtype)
            return control_flow_ops.with_dependencies(
                [check_ops.assert_less(
                    two, alpha,
                    message="variance not defined for components of alpha <= 2")],
                var_if_defined)
function_tokens: def variance ( self , name = "variance" ) : alpha = self . _alpha beta = self . _beta with ops . name_scope ( self . name ) : with ops . op_scope ( [ alpha , beta ] , name ) : var_if_defined = ( math_ops . square ( self . _beta ) / ( math_ops . square ( self . _alpha - 1.0 ) * ( self . _alpha - 2.0 ) ) ) if self . allow_nan_stats : alpha_gt_2 = alpha > 2.0 nan = np . nan * self . _ones ( ) return math_ops . select ( alpha_gt_2 , var_if_defined , nan ) else : two = constant_op . constant ( 2.0 , dtype = self . dtype ) return control_flow_ops . with_dependencies ( [ check_ops . assert_less ( two , alpha , message = "variance not defined for components of alpha <= 2" ) ] , var_if_defined )