class_docstr: Selects instances by expected gradient length [Set07]_.
class_docstr_tok: ["Selects","instances","by","expected","gradient","length","[","Set07","]","_","."]
code: def initialize_gradients(self, batch_len):
      return torch.zeros([self.num_classes, batch_len]).to(
          self.device, non_blocking=True
      )
  
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 6 for calling the ExpectedGradientLength obj's underlying member method code with example usage: obj.initialize_gradients(batch_len) and returns: torch