Skip to content

Commit

Permalink
Update beta sampling code in augment.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyaghosh authored Dec 11, 2024
1 parent 8c5c79c commit a2a8547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions official/vision/ops/augment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2709,8 +2709,8 @@ def distort(self, images: tf.Tensor,

@staticmethod
def _sample_from_beta(alpha, beta, shape):
sample_alpha = tf.random.gamma(shape, 1., beta=alpha)
sample_beta = tf.random.gamma(shape, 1., beta=beta)
sample_alpha = tf.random.gamma(shape, alpha, beta=1.0)
sample_beta = tf.random.gamma(shape, beta, beta=1.0)
return sample_alpha / (sample_alpha + sample_beta)

def _cutmix(self, images: tf.Tensor,
Expand Down

0 comments on commit a2a8547

Please sign in to comment.