class_docstr: An EGL variant that is restricted to the gradients of a single layer.
  
  This is a generalized version of the EGL-sm strategy [ZLW17]_, but instead of being
  restricted to the last layer it operates on the layer name passed to the constructor.
class_docstr_tok: ["An","EGL","variant","that","is","restricted","to","the","gradients","of","a","single","layer",".","This","is","a","generalized","version","of","the","EGL-sm","strategy","[","ZLW17","]","_",",","but","instead","of","being","restricted","to","the","last","layer","it","operates","on","the","layer","name","passed","to","the","constructor","."]
docstr: Parameters
  ----------
  num_classes : int
      Number of classes.
  layer_name : str
      Name of the target layer.
  batch_size : int, default=50
      Batch size in which the query strategy scores the instances.
docstr_tok: ["Parameters","--","--","--","--","--","num_classes",":","int","Number","of","classes",".","layer_name",":","str","Name","of","the","target","layer",".","batch_size",":","int",",","default=50","Batch","size","in","which","the","query","strategy","scores","the","instances","."]
code: def __init__(self, num_classes, layer_name, batch_size=50):
      """
      Parameters
      ----------
      num_classes : int
          Number of classes.
      layer_name : str
          Name of the target layer.
      batch_size : int, default=50
          Batch size in which the query strategy scores the instances.
      """
      super().__init__(num_classes, batch_size=batch_size)
      self.layer_name = layer_name
  
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 ExpectedGradientLengthLayer object from inherited base classes: ExpectedGradientLength with example: obj = ExpectedGradientLengthLayer(num_classes, layer_name, batch_size)