parameters: (self, probs=None)
return_statement: return self.reduce_sum(self.square(index) * probs, -1) -\
              self.square(self.reduce_sum(index * probs, -1))
docstring: r"""
          .. math::
              VAR(X) = E[X^{2}] - (E[X])^{2}
docstring_summary: r"""
          .. math::
              VAR(X) = E[X^{2}] - (E[X])^{2}
docstring_tokens: r .. math :: VAR ( X ) = E [ X^ { 2 } ] - ( E [ X ] ) ^ { 2 }
function: def _var(self, probs=None):
          r"""
          .. math::
              VAR(X) = E[X^{2}] - (E[X])^{2}
          """
          probs = self._check_param_type(probs)
          num_classes = self.shape(probs)[-1]
          index = nn.Range(0., num_classes, 1.)()
          return self.reduce_sum(self.square(index) * probs, -1) -\
              self.square(self.reduce_sum(index * probs, -1))
function_tokens: def _var ( self , probs = None ) : probs = self . _check_param_type ( probs ) num_classes = self . shape ( probs ) [ - 1 ] index = nn . Range ( 0. , num_classes , 1. ) ( ) return self . reduce_sum ( self . square ( index ) * probs , - 1 ) - self . square ( self . reduce_sum ( index * probs , - 1 ) )