class_docstr: WrongPredictionVis class for visualizing video inputs to Tensorboard
  for instances that the model makes wrong predictions.
class_docstr_tok: ["WrongPredictionVis","class","for","visualizing","video","inputs","to","Tensorboard","for","instances","that","the","model","makes","wrong","predictions","."]
docstr: Returns a 1D tensor that contains the indices of instances that have
  wrong predictions, where true labels in in the specified subset.
  Args:
      labels (tensor): tensor of shape (n_instances,) containing class ids.
      preds (tensor): class scores from model, shape (n_intances, n_classes)
  Returns:
      mask (tensor): boolean tensor. `mask[i]` is True if `model` makes a wrong prediction.
docstr_tok: ["Returns","a","1D","tensor","that","contains","the","indices","of","instances","that","have","wrong","predictions",",","where","true","labels","in","in","the","specified","subset",".","Args",":","labels","(","tensor",")",":","tensor","of","shape","(","n_instances",",",")","containing","class","ids",".","preds","(","tensor",")",":","class","scores","from","model",",","shape","(","n_intances",",","n_classes",")","Returns",":","mask","(","tensor",")",":","boolean","tensor",".","`","mask","[","i","]","`","is","True","if","`","model","`","makes","a","wrong","prediction","."]
code: def _pick_wrong_preds(self, labels, preds):
      """
      Returns a 1D tensor that contains the indices of instances that have
      wrong predictions, where true labels in in the specified subset.
      Args:
          labels (tensor): tensor of shape (n_instances,) containing class ids.
          preds (tensor): class scores from model, shape (n_intances, n_classes)
      Returns:
          mask (tensor): boolean tensor. `mask[i]` is True if `model` makes a wrong prediction.
      """
      subset_mask = torch.ones(size=(len(labels),), dtype=torch.bool)
      if self.subset is not None:
          for i, label in enumerate(labels):
              if label not in self.subset:
                  subset_mask[i] = False
  
      preds_ids = torch.argmax(preds, dim=-1)
  
      mask = preds_ids != labels
      mask &= subset_mask
      for i, wrong_pred in enumerate(mask):
          if wrong_pred:
              self.model_incorrect_classes.add(labels[i])
  
      return mask
  
file_path: SlowFast/slowfast/visualization/prediction_vis.py
imports: import numpy
  import torch
  import slowfast.datasets.utils
  import slowfast.utils.logging
  import slowfast.visualization.tensorboard_vis
  from slowfast.utils.misc import get_class_names
  from slowfast.visualization.video_visualizer import VideoVisualizer
label_desc: Use image node_id 2 for calling the WrongPredictionVis obj's underlying member method code with example usage: obj._pick_wrong_preds(labels, preds) and returns: mask