class_docstr: Bernoulli distribution.
  
  The Bernoulli distribution with `probs` parameter, i.e., the probability of a
  `1` outcome (vs a `0` outcome).
class_docstr_tok: ["Bernoulli","distribution",".","The","Bernoulli","distribution","with","`","probs","`","parameter",",","i.e.",",","the","probability","of","a","`","1","`","outcome","(","vs","a","`","0","`","outcome",")","."]
code: def _sample_n(self, n, seed=None):
      new_shape = array_ops.concat([[n], self.batch_shape_tensor()], 0)
      uniform = random_ops.random_uniform(
          new_shape, seed=seed, dtype=self.probs.dtype
      )
      sample = math_ops.less(uniform, self.probs)
      return math_ops.cast(sample, self.dtype)
  
imports: from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops.distributions import distribution
  from tensorflow.python.ops.distributions import kullback_leibler
  from tensorflow.python.ops.distributions import util
  from tensorflow.python.util import deprecation
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 9 for calling the Bernoulli obj's underlying member method code with example usage: obj._sample_n(n, seed) and returns: math_ops