def _sample(self, n_samples):
alpha, beta = maybe_explicit_broadcast(
self.alpha, self.beta, 'alpha', 'beta')
x = tf.random_gamma([n_samples], alpha, beta=1, dtype=self.dtype)
y = tf.random_gamma([n_samples], beta, beta=1, dtype=self.dtype)
return x / (x + y)
评论列表
文章目录