class_docstr: emotion postprocess
class_docstr_tok: ["emotion","postprocess"]
code: def __init__(self, config):
      super().__init__(config)
  
      taskconf = self.config["data"]["task"]
      self.positive_id = self.config["solver"]["metrics"]["pos_label"]
      self.class_vocab = taskconf["classes"]["vocab"]
      self.reverse_vocab = taskconf["classes"]["reverse_vocab"]
      self.num_class = taskconf["classes"]["num"]
  
      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.thresholds = postconf["thresholds"]
      self.smoothing = postconf["smoothing"]["enable"]
      self.smoothing_cnt = postconf["smoothing"]["count"]
  
      if self.infer:
          self.pred_score_path = os.path.join(
              self.output_dir, "predict_scores.txt"
          )
          self.pred_result_path = os.path.join(
              self.output_dir, "predict_results.pkl"
          )
      if self.eval:
          self.pred_metrics_path = os.path.join(
              self.output_dir, "metrics.txt"
          )
  
file_path: delta/delta/utils/postprocess/speech_cls_proc.py
imports: import os
  import pickle
  import collections
  import numpy
  from absl import logging
  from sklearn.metrics import confusion_matrix
  from delta import utils
  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 EmoPostProc object from inherited base classes: PostProc with example: obj = EmoPostProc(config)