class_docstr: Implements "Batch Active learning by Diverse Gradient Embedding" (BADGE) [AZK+20]_.
      
class_docstr_tok: ["Implements","``","Batch","Active","learning","by","Diverse","Gradient","Embedding","''","(","BADGE",")","[","AZK+20","]","_","."]
docstr: Parameters
  ----------
  num_classes : int
      Number of classes.
docstr_tok: ["Parameters","--","--","--","--","--","num_classes",":","int","Number","of","classes","."]
code: def __init__(self, num_classes):
      """
      Parameters
      ----------
      num_classes : int
          Number of classes.
      """
      self.num_classes = num_classes
  
imports: import numpy
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from small_text.query_strategies import constraints, QueryStrategy, EmbeddingBasedQueryStrategy
  from small_text.utils.clustering import init_kmeans_plusplus_safe
  from small_text.utils.context import build_pbar_context
  from small_text.utils.data import list_length
label_desc: Use image node_id 1 to create a new BADGE object from inherited base classes: EmbeddingBasedQueryStrategy with example: obj = BADGE(num_classes)