CoinFlip

class dragon.vm.dali.ops.CoinFlip[source]

Sample values from a bernoulli distribution.

Examples:

flip_rng = dali.ops.CoinFlip(0.5)
value = flip_rng()

__new__

static CoinFlip.__new__(
  cls,
  probability=0.5
)[source]

Create a CoinFlip operator.

Parameters:
  • probability (float, optional, default=0.5) – The probability to return 1.
Returns:

nvidia.dali.ops.CoinFlip – The operator.