class_docstr: Apply speaker embedding extraction on hidden layer outputs. 
code: def __init__(self, config):
      super().__init__(config)
  
      postconf = self.config["solver"]["postproc"]
  
      output_dir = postconf["pred_path"]
      self.output_dir = (
          output_dir
          if output_dir
          else os.path.join(
              self.config["solver"]["saver"]["model_path"], "infer"
          )
      )
      if not os.path.exists(self.output_dir):
          os.makedirs(self.output_dir)
  
      self.log_verbose = postconf["log_verbose"]
  
      self.eval = postconf["eval"]
      self.infer = postconf["infer"]
  
      self.stats = None
      self.confusion = None
  
      # e.g.["embeddings", "softmax"]
      self.outputs = postconf["output_nodes"]
      assert "embeddings" in self.outputs
  
      self.output_files = collections.defaultdict(dict)
  
      # e.g. ["utt", "chunk"]
      self.output_levels = postconf["output_levels"]
      assert "utt" in self.output_levels
  
      for output_level in self.output_levels:
          for output_key in self.outputs:
              output_file_name = "%s_%s" % (output_level, output_key)
              self.output_files[output_level][
                  output_key
              ] = os.path.join(self.output_dir, output_file_name)
  
      logging.info(f"save to: {self.output_files}")
      self.pred_metrics_path = os.path.join(
          self.output_dir, "metrics.txt"
      )
  
file_path: delta/delta/utils/postprocess/speaker_cls_proc.py
imports: import os
  import collections
  import numpy
  from absl import logging
  from kaldiio import WriteHelper
  from delta.utils.postprocess.base_postproc import PostProc
  from delta.utils.register import registers
label_desc: Use image node_id 1 to create a new SpeakerPostProc object from inherited base classes: PostProc with example: obj = SpeakerPostProc(config)