code: def get_logging_output(
      self,
      sample,
      loss,
      nll_loss,
      correct,
      total,
      src_token_num=0,
      speech_loss=None,
      speech_nll_loss=None,
      attn_cost=None,
      is_dual_input=False,
  ):
      sample_size = (
          sample["target"].size(0)
          if self.sentence_avg
          else sample["ntokens"]
      )
      mul_size = 2 if is_dual_input else 1
  
      logging_output = {
          "loss": utils.item(loss.data),  # * sample['ntokens'],
          "nll_loss": utils.item(nll_loss.data),  # * sample['ntokens'],
          "ntokens": sample["ntokens"] * mul_size,
          "nsentences": sample["target"].size(0) * mul_size,
          "sample_size": sample_size * mul_size,
          "correct": utils.item(correct.data),
          "total": utils.item(total.data),
          "src_token_num": utils.item(src_token_num.data)
          if src_token_num > 0
          else 0,
          "nframes": torch.sum(
              sample["net_input"]["src_lengths"]
          ).item(),
      }
  
      if speech_loss is not None:
          logging_output["speech_loss"] = utils.item(speech_loss.data)
          logging_output["speech_nll_loss"] = utils.item(
              speech_nll_loss.data
          )
          logging_output["sample_size_speech_cost"] = sample_size
          logging_output["speech_attn_loss"] = attn_cost
  
      return sample_size * mul_size, logging_output
  
file_path: fairseq/examples/speech_text_joint_to_text/criterions/text_guide_cross_entropy_acc.py
imports: import math
  import torch
  import torch.nn.functional
  from fairseq import utils
  from fairseq.criterions import FairseqCriterion, register_criterion
  from fairseq.criterions.label_smoothed_cross_entropy import label_smoothed_nll_loss
  from fairseq.logging import metrics
label_desc: Use image node_id 6 for calling the GuidedCrossEntAccCriterion obj's underlying member method code with example usage: obj.get_logging_output(sample, loss, nll_loss, correct, total, src_token_num, speech_loss, speech_nll_loss, attn_cost, is_dual_input) and returns: unknown,  logging_output