keras/src/layers/regularization/alpha_dropout.py/AlphaDropout/call
class AlphaDropout:    def call(self, inputs, training=False):
        if training and self.rate > 0:
            noise_shape = self._get_concrete_noise_shape(
                inputs, self.noise_shape
            )
            alpha = 1.6732632423543772848170429916717
            scale = 1.0507009873554804934193349852946
            alpha_p = -alpha * scale

            kept_idx = ops.greater_equal(
                ops.random.uniform(noise_shape, seed=self.seed_generator),
                self.rate,
            )
            kept_idx = ops.cast(kept_idx, inputs.dtype)

            # Compute affine transformation parameters
            a = ((1 - self.rate) * (1 + self.rate * alpha_p**2)) ** -0.5
            b = -a * alpha_p * self.rate

            # Apply mask
            x = inputs * kept_idx + alpha_p * (1 - kept_idx)
            return a * x + b

        return inputs