class_docstr: This hook is used when config.METERS:.model_output_mask=True. It is used to ignore
  certain classes during test-time and is used for Imagenet out-of-domain datasets
  (e.g. objectnet and imagenet_r).
  
  The logic is as follows:
  
  1. Find all unique label indexes in the test set.
  2. During testing, set model output to -inf when the label index is not present, leave it
  unchanged otherwise.
  3. Feed model output into the respective meters. For classification with logit outputs,
  this has the effect of ignoring the classes that are not present in the
  top-1/top-5 calculations.
code: def _create_model_output_masks(
      self, model_outputs: Union[torch.Tensor, List[torch.Tensor]]
  ):
      if self.model_output_masks is not None:
          return self.model_output_masks
  
      # Model output can be a list of tensors or a tensor.
      if not isinstance(model_outputs, list):
          model_outputs = [model_outputs]
  
      # Read the labels present and create the model_output_mask
      masks = []
      for model_output in model_outputs:
          mask = []
          for i in range(model_output.shape[-1]):
              mask.append(i not in self.unique_labels)
          mask = torch.tensor(mask, device=model_output.device)
          masks.append(mask)
  
      self.model_output_masks = masks
      return self.model_output_masks
  
file_path: vissl/vissl/hooks/model_output_mask_hook.py
imports: import math
  from typing import List, Union
  import torch
  from classy_vision import tasks
  from classy_vision.hooks.classy_hook import ClassyHook
label_desc: Use image node_id 3 for calling the ModelOutputMaskHook obj's underlying member method code with example usage: obj._create_model_output_masks(model_outputs) and returns: self, self