docstr: Initialize dropout module.
  
  tie: tie dropout mask across sequence lengths (Dropout1d/2d/3d)
docstr_tok: ["Initialize","dropout","module",".","tie",":","tie","dropout","mask","across","sequence","lengths","(","Dropout1d\/2d\/3d",")"]
code: def __init__(self, p: float = 0.5, tie=True, transposed=True):
      """Initialize dropout module.
  
      tie: tie dropout mask across sequence lengths (Dropout1d/2d/3d)
      """
      super().__init__()
      if p < 0 or p >= 1:
          raise ValueError(
              "dropout probability has to be in [0, 1), "
              "but got {}".format(p)
          )
      self.p = p
      self.tie = tie
      self.transposed = transposed
      self.binomial = torch.distributions.binomial.Binomial(
          probs=1 - self.p
      )
  
imports: import math
  from functools import partial
  import torch
  import torch.nn
  import torch.nn.functional
  from einops import rearrange
  from opt_einsum import contract
label_desc: Use image node_id 1 to create a new DropoutNd object from inherited base classes: nn with example: obj = DropoutNd(p, tie, transposed)