class_docstr: Define a chainer reporter wrapper.
docstr: Define a chainer reporter function.
code: def report(
      self,
      loss_ctc_list,
      loss_att,
      acc,
      cer_ctc_list,
      cer,
      wer,
      mtl_loss,
  ):
      """Define a chainer reporter function."""
      # loss_ctc_list = [weighted CTC, CTC1, CTC2, ... CTCN]
      # cer_ctc_list = [weighted cer_ctc, cer_ctc_1, cer_ctc_2, ... cer_ctc_N]
      num_encs = len(loss_ctc_list) - 1
      reporter.report({"loss_ctc": loss_ctc_list[0]}, self)
      for i in range(num_encs):
          reporter.report(
              {"loss_ctc{}".format(i + 1): loss_ctc_list[i + 1]}, self
          )
      reporter.report({"loss_att": loss_att}, self)
      reporter.report({"acc": acc}, self)
      reporter.report({"cer_ctc": cer_ctc_list[0]}, self)
      for i in range(num_encs):
          reporter.report(
              {"cer_ctc{}".format(i + 1): cer_ctc_list[i + 1]}, self
          )
      reporter.report({"cer": cer}, self)
      reporter.report({"wer": wer}, self)
      logging.info("mtl loss:" + str(mtl_loss))
      reporter.report({"loss": mtl_loss}, self)
  
imports: import argparse
  import logging
  import math
  import os
  from itertools import groupby
  import chainer
  import numpy
  import torch
  from chainer import reporter
  from espnet.nets.asr_interface import ASRInterface
  from espnet.nets.e2e_asr_common import label_smoothing_dist
  from espnet.nets.pytorch_backend.ctc import ctc_for
  from espnet.nets.pytorch_backend.nets_utils import get_subsample, pad_list, to_device, to_torch_tensor
  from espnet.nets.pytorch_backend.rnn.attentions import att_for
  from espnet.nets.pytorch_backend.rnn.decoders import decoder_for
  from espnet.nets.pytorch_backend.rnn.encoders import Encoder, encoder_for
  from espnet.nets.scorers.ctc import CTCPrefixScorer
  from espnet.utils.cli_utils import strtobool
label_desc: Use image node_id 1 for calling the Reporter obj's underlying member method code with example usage: obj.report(loss_ctc_list, loss_att, acc, cer_ctc_list, cer, wer, mtl_loss) without return types