class_docstr: This is a generalization of a categorical distribution.
  
  The support for the DiscreteValued distribution can be any real valued range,
  whereas the categorical distribution has support [0, n_categories - 1] or
  [1, n_categories]. This generalization allows us to take the mean of the
  distribution over its support.
class_docstr_tok: ["This","is","a","generalization","of","a","categorical","distribution",".","The","support","for","the","DiscreteValued","distribution","can","be","any","real","valued","range",",","whereas","the","categorical","distribution","has","support","[","0",",","n_categories","-","1","]","or","[","1",",","n_categories","]",".","This","generalization","allows","us","to","take","the","mean","of","the","distribution","over","its","support","."]
docstr: Overrides the Categorical variance by incorporating category values.
docstr_tok: ["Overrides","the","Categorical","variance","by","incorporating","category","values","."]
code: def _variance(self) -> tf.Tensor:
      """Overrides the Categorical variance by incorporating category values."""
      dist_squared = tf.square(
          tf.expand_dims(self.mean(), -1) - self.values
      )
      return tf.reduce_sum(
          self.probs_parameter() * dist_squared, axis=-1
      )
  
file_path: acme/acme/tf/networks/distributions.py
imports: from typing import Optional
  import tensorflow
  import tensorflow_probability
label_desc: Use image node_id 6 for calling the DiscreteValuedDistribution obj's underlying member method code with example usage: obj._variance() and returns: tf