class_docstr: For :math:`N` tensors, they use different dropout masks respectively.
  When :math:`N-M` of them are dropped, the remaining :math:`M` ones are scaled by a factor of :math:`N/M` to compensate,
  and when all of them are dropped together, zeros are returned.
  
  Args:
      p (float):
          The probability of an element to be zeroed. Default: 0.5.
  
  Examples:
      >>> x, y = torch.ones(1, 3, 5), torch.ones(1, 3, 5)
      >>> x, y = IndependentDropout()(x, y)
      >>> x
      tensor([[[1., 1., 1., 1., 1.],
               [0., 0., 0., 0., 0.],
               [2., 2., 2., 2., 2.]]])
      >>> y
      tensor([[[1., 1., 1., 1., 1.],
               [2., 2., 2., 2., 2.],
               [0., 0., 0., 0., 0.]]])
class_docstr_tok: ["For",":","math",":","`","N","`","tensors",",","they","use","different","dropout","masks","respectively",".","When",":","math",":","`","N-M","`","of","them","are","dropped",",","the","remaining",":","math",":","`","M","`","ones","are","scaled","by","a","factor","of",":","math",":","`","N\/M","`","to","compensate",",","and","when","all","of","them","are","dropped","together",",","zeros","are","returned",".","Args",":","p","(","float",")",":","The","probability","of","an","element","to","be","zeroed",".","Default",":","0.5",".","Examples",":",">",">",">","x",",","y","=","torch.ones","(","1",",","3",",","5",")",",","torch.ones","(","1",",","3",",","5",")",">",">",">","x",",","y","=","IndependentDropout","(",")","(","x",",","y",")",">",">",">","x","tensor","(","[","[","[","1.",",","1.",",","1.",",","1.",",","1",".","]",",","[","0.",",","0.",",","0.",",","0.",",","0",".","]",",","[","2.",",","2.",",","2.",",","2.",",","2",".","]","]","]",")",">",">",">","y","tensor","(","[","[","[","1.",",","1.",",","1.",",","1.",",","1",".","]",",","[","2.",",","2.",",","2.",",","2.",",","2",".","]",",","[","0.",",","0.",",","0.",",","0.",",","0",".","]","]","]",")"]
code: def __init__(self, p=0.5):
      super().__init__()
  
      self.p = p
  
imports: import torch
  import torch.nn
  from torch.nn.utils.rnn import pack_padded_sequence, PackedSequence
  from torch.nn.modules.rnn import apply_permutation
label_desc: Use image node_id 1 to create a new IndependentDropout object from inherited base classes: nn with example: obj = IndependentDropout(p)