class_docstr: Binomial distribution.
  
  This distribution is parameterized by `probs`, a (batch of) probabilities for
  drawing a `1`, and `total_count`, the number of trials per draw from the
  Binomial.
  
  #### Mathematical Details
  
  The Binomial is a distribution over the number of `1`'s in `total_count`
  independent trials, with each trial having the same probability of `1`, i.e.,
  `probs`.
  
  The probability mass function (pmf) is,
  
  ```none
  pmf(k; n, p) = p**k (1 - p)**(n - k) / Z
  Z = k! (n - k)! / n!
  ```
  
  where:
  * `total_count = n`,
  * `probs = p`,
  * `Z` is the normalizing constant, and,
  * `n!` is the factorial of `n`.
  
  #### Examples
  
  Create a single distribution, corresponding to 5 coin flips.
  
  ```python
  dist = Binomial(total_count=5., probs=.5)
  ```
  
  Create a single distribution (using logits), corresponding to 5 coin flips.
  
  ```python
  dist = Binomial(total_count=5., logits=0.)
  ```
  
  Creates 3 distributions with the third distribution most likely to have
  successes.
  
  ```python
  p = [.2, .3, .8]
  # n will be broadcast to [4., 4., 4.], to match p.
  dist = Binomial(total_count=4., probs=p)
  ```
  
  The distribution functions can be evaluated on counts.
  
  ```python
  # counts same shape as p.
  counts = [1., 2, 3]
  dist.prob(counts)  # Shape [3]
  
  # p will be broadcast to [[.2, .3, .8], [.2, .3, .8]] to match counts.
  counts = [[1., 2, 1], [2, 2, 4]]
  dist.prob(counts)  # Shape [2, 3]
  
  # p will be broadcast to shape [5, 7, 3] to match counts.
  counts = [[...]]  # Shape [5, 7, 3]
  dist.prob(counts)  # Shape [5, 7, 3]
  ```
class_docstr_tok: ["Binomial","distribution",".","This","distribution","is","parameterized","by","`","probs","`",",","a","(","batch","of",")","probabilities","for","drawing","a","`","1","`",",","and","`","total_count","`",",","the","number","of","trials","per","draw","from","the","Binomial",".","#","#","#","#","Mathematical","Details","The","Binomial","is","a","distribution","over","the","number","of","`","1","`","'s","in","`","total_count","`","independent","trials",",","with","each","trial","having","the","same","probability","of","`","1","`",",","i.e.",",","`","probs","`",".","The","probability","mass","function","(","pmf",")","is",",","``","`","none","pmf","(","k",";","n",",","p",")","=","p","*","*","k","(","1","-","p",")","*","*","(","n","-","k",")","\/","Z","Z","=","k","!","(","n","-","k",")","!","\/","n","!","``","`","where",":","*","`","total_count","=","n","`",",","*","`","probs","=","p","`",",","*","`","Z","`","is","the","normalizing","constant",",","and",",","*","`","n","!","`","is","the","factorial","of","`","n","`",".","#","#","#","#","Examples","Create","a","single","distribution",",","corresponding","to","5","coin","flips",".","``","`","python","dist","=","Binomial","(","total_count=5.",",","probs=.5",")","``","`","Create","a","single","distribution","(","using","logits",")",",","corresponding","to","5","coin","flips",".","``","`","python","dist","=","Binomial","(","total_count=5.",",","logits=0",".",")","``","`","Creates","3","distributions","with","the","third","distribution","most","likely","to","have","successes",".","``","`","python","p","=","[",".2",",",".3",",",".8","]","#","n","will","be","broadcast","to","[","4.",",","4.",",","4",".","]",",","to","match","p.","dist","=","Binomial","(","total_count=4.",",","probs=p",")","``","`","The","distribution","functions","can","be","evaluated","on","counts",".","``","`","python","#","counts","same","shape","as","p.","counts","=","[","1.",",","2",",","3","]","dist.prob","(","counts",")","#","Shape","[","3","]","#","p","will","be","broadcast","to","[","[",".2",",",".3",",",".8","]",",","[",".2",",",".3",",",".8","]","]","to","match","counts",".","counts","=","[","[","1.",",","2",",","1","]",",","[","2",",","2",",","4","]","]","dist.prob","(","counts",")","#","Shape","[","2",",","3","]","#","p","will","be","broadcast","to","shape","[","5",",","7",",","3","]","to","match","counts",".","counts","=","[","[","...","]","]","#","Shape","[","5",",","7",",","3","]","dist.prob","(","counts",")","#","Shape","[","5",",","7",",","3","]","``","`"]
docstr: Number of trials.
docstr_tok: ["Number","of","trials","."]
code: def total_count(self):
      """Number of trials."""
      return self._total_count
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import batched_rejection_sampler
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import implementation_selection
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import special
label_desc: Use image node_id 3 for calling the Binomial obj's underlying member method code with example usage: obj.total_count() and returns: self