class_docstr: Sort by the highest acquisition function value.
  References:
      https://arxiv.org/abs/1703.02910
class_docstr_tok: ["Sort","by","the","highest","acquisition","function","value",".","References",":","https",":","\/\/arxiv.org\/abs\/1703.02910"]
code: def compute_score(self, predictions):
      assert predictions.ndimension() >= 3
      # [n_sample, n_class, ..., n_iterations]
      expected_entropy = -torch.mean(
          torch.sum(predictions * torch.log(predictions + 1e-5), 1),
          dim=-1,
      )  # [batch size, ...]
      expected_p = torch.mean(
          predictions, dim=-1
      )  # [batch_size, n_classes, ...]
      entropy_expected_p = -torch.sum(
          expected_p * torch.log(expected_p + 1e-5), dim=1
      )  # [batch size, ...]
      bald_acq = entropy_expected_p - expected_entropy
      return bald_acq
  
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 2 for calling the BALDGPUWrapper obj's underlying member method code with example usage: obj.compute_score(predictions) and returns: bald_acq