code: def alpha_dropout(
      self: TensorLikeType,
      p: float = 0.5,
      training: bool = False,
      inplace: bool = False,
  ) -> TensorLikeType:
      if inplace:
          raise NotImplementedError
  
      if not training:
          return self
  
      torch._check(
          p <= 1 and p >= 0,
          lambda: f"dropout probability has to be between 0 and 1, but got, {p}",
      )
  
      if p == 1:
          return torch.zeros_like(self)
  
      if p == 0:
          return self
  
      dropout_mask = _dropout_helper(self, 1 - p)
  
      # From paper: Self-Normalizing Neural Networks (https://arxiv.org/pdf/1706.02515.pdf)
      # alpha = - SELU.alpha * SELU.scale, here
      # SELU.alpha = 1.6732632423543772848170429916717 and
      # SELU.scale = 1.0507009873554804934193349852946
      alpha = -1.7580993408473766
  
      a = 1.0 / math.sqrt((alpha * alpha * p + 1) * (1 - p))
      b = torch.logical_not(dropout_mask)
      b = b * (alpha * a) + alpha * a * p
      dropout_mask = a * dropout_mask
  
      return self * dropout_mask + b
  
imports: import math
  from functools import wraps
  from typing import Callable, Optional, Union
  import torch
  import torch._prims
  import torch._prims_common
  import torch._refs
  from torch._decomp import register_decomposition
  from torch._prims_common import ELEMENTWISE_TYPE_PROMOTION_KIND, NumberType, ShapeType, TensorLike, TensorLikeType
  from torch._prims_common.wrappers import elementwise_type_promotion_wrapper, elementwise_unary_scalar_wrapper, out_wrapper
  from torch._refs import _make_inplace
label_desc: Use image node_id 2 for calling a global function with example usage: alpha_dropout(p, training, inplace) and returns: unknown, self, torch, self