class_docstr: Create and applies obfuscation masks.
  The obfuscation is done at group level to match attention.
class_docstr_tok: ["Create","and","applies","obfuscation","masks",".","The","obfuscation","is","done","at","group","level","to","match","attention","."]
docstr: Generate random obfuscation mask.
  
  Returns
  -------
  masked input and obfuscated variables.
docstr_tok: ["Generate","random","obfuscation","mask",".","Returns","--","--","--","-","masked","input","and","obfuscated","variables","."]
code: def forward(self, x):
      """
      Generate random obfuscation mask.
  
      Returns
      -------
      masked input and obfuscated variables.
      """
      bs = x.shape[0]
  
      obfuscated_groups = torch.bernoulli(
          self.pretraining_ratio
          * torch.ones((bs, self.num_groups), device=x.device)
      )
      obfuscated_vars = torch.matmul(
          obfuscated_groups, self.group_matrix
      )
      masked_input = torch.mul(1 - obfuscated_vars, x)
      return masked_input, obfuscated_groups, obfuscated_vars
  
imports: import torch
  from torch.nn import Linear, BatchNorm1d, ReLU
  import numpy
  from pytorch_tabnet import sparsemax
label_desc: Use image node_id 2 for calling the RandomObfuscator obj's underlying member method code with example usage: obj.forward(x) and returns: masked_input,  obfuscated_groups,  obfuscated_vars