def _get_lambda()

in torchrecipes/utils/mixup_utils.py [0:0]


    def _get_lambda(alpha: float = 1.0) -> float:
        # Sample from a beta distribution
        # The result is used for linear interpolation
        if alpha > 0.0:
            lam = np.random.beta(alpha, alpha)
        else:
            lam = 1.0
        return lam