class_docstr: Simple Plugin for weight extraction.
docstr: Extracts weights.
docstr_tok: ["Extracts","weights","."]
code: def after_training_batch(
      self, batch_no, epoch, total_number_of_batches, **kw
  ):
      """Extracts weights."""
      modulo = max(1, int(total_number_of_batches / 10))
      iteration = epoch * total_number_of_batches + batch_no
  
      if (iteration + 1) % modulo == 0:
          self.weight_extractor.extract_weights(
              self.model.state_dict(), iteration
          )
  
file_path: flair/flair/trainers/plugins/functional/weight_extractor.py
imports: from typing import Any, Dict
  from flair.trainers.plugins.base import TrainerPlugin
  from flair.training_utils import WeightExtractor
label_desc: Use image node_id 2 for calling the WeightExtractorPlugin obj's underlying member method code with example usage: obj.after_training_batch(batch_no, epoch, total_number_of_batches) without return types