docstr: cfg for the multitask criterion
docstr_tok: ["cfg","for","the","multitask","criterion"]
code: def criterion_cfg(self):
      """cfg for the multitask criterion"""
      if self.decoder_type == "ctc":
          from fairseq.criterions.ctc import CtcCriterionConfig
  
          cfg = CtcCriterionConfig
          cfg.zero_infinity = self.config.get("zero_infinity", True)
      else:
          from fairseq.criterions.label_smoothed_cross_entropy import (
              LabelSmoothedCrossEntropyCriterionConfig,
          )
  
          cfg = LabelSmoothedCrossEntropyCriterionConfig
          cfg.label_smoothing = self.config.get("label_smoothing", 0.2)
      return cfg
  
imports: import logging
  from argparse import Namespace
  from copy import deepcopy
  from pathlib import Path
  from typing import Dict, Optional
  from fairseq.data import Dictionary
label_desc: Use image node_id 5 for calling the SingleTaskConfig obj's underlying member method code with example usage: obj.criterion_cfg() and returns: cfg