(self,
                          size: Tuple[int, int],
                          p: float)
return b.new_empty(size).bernoulli_(1 - p).div_(1 - p)
Composes the dropout mask for the `SRUCell`.
Composes the dropout mask for the `SRUCell`.
Composes the dropout mask for the SRUCell .
def get_dropout_mask_(self,
                          size: Tuple[int, int],
                          p: float) -> Tensor:
        """
        Composes the dropout mask for the `SRUCell`.
        """
        b = self.bias.data
        return b.new_empty(size).bernoulli_(1 - p).div_(1 - p)
def get_dropout_mask_ ( self , size : Tuple [ int , int ] , p : float ) -> Tensor : b = self . bias . data return b . new_empty ( size ) . bernoulli_ ( 1 - p ) . div_ ( 1 - p )