class_docstr: Implementation of word dropout.
  
  Randomly drops out entire words (or characters) in embedding space.
class_docstr_tok: ["Implementation","of","word","dropout",".","Randomly","drops","out","entire","words","(","or","characters",")","in","embedding","space","."]
code: def forward(self, x):
      if not self.training or not self.dropout_rate:
          return x
  
      m = x.data.new(x.size(0), x.size(1), 1).bernoulli_(
          1 - self.dropout_rate
      )
  
      mask = torch.autograd.Variable(m, requires_grad=False)
      return mask * x
  
file_path: flair/flair/nn/dropout.py
imports: import torch
label_desc: Use image node_id 2 for calling the WordDropout obj's underlying member method code with example usage: obj.forward(x) and returns: unknown, x