class_docstr: Abstract class that defines a Heuristic.
  
  Args:
      shuffle_prop (float): shuffle proportion.
      threshold (Optional[float]): threshold the probabilities.
      reverse (bool): True if the most uncertain sample has the highest value.
      reduction (Union[str, Callable]): Reduction used after computing the score.
class_docstr_tok: ["Abstract","class","that","defines","a","Heuristic",".","Args",":","shuffle_prop","(","float",")",":","shuffle","proportion",".","threshold","(","Optional","[","float","]",")",":","threshold","the","probabilities",".","reverse","(","bool",")",":","True","if","the","most","uncertain","sample","has","the","highest","value",".","reduction","(","Union","[","str",",","Callable","]",")",":","Reduction","used","after","computing","the","score","."]
code: def __init__(
      self,
      model: ModelWrapper,
      criterion,
      shuffle_prop=0.0,
      threshold=None,
      reverse=False,
      reduction="none",
  ):
      super().__init__(model, criterion)
      self.shuffle_prop = shuffle_prop
      self.threshold = threshold
      self.reversed = reverse
      assert reduction in available_reductions or callable(reduction)
      self.reduction = (
          reduction
          if callable(reduction)
          else available_reductions[reduction]
      )
  
file_path: baal/baal/active/heuristics/heuristics_gpu.py
imports: from typing import Callable, Optional, Sequence
  import numpy
  import torch
  import torch.nn.functional
  from baal.active.dataset.base import Dataset
  from baal import ModelWrapper
label_desc: Use image node_id 1 to create a new AbstractGPUHeuristic object from inherited base classes: ModelWrapper with example: obj = AbstractGPUHeuristic(model, criterion, shuffle_prop, threshold, reverse, reduction)