code: def __init__(self, task, sentence_avg):
      super().__init__(task)
      self.sentence_avg = sentence_avg
  
file_path: fairseq/fairseq/criterions/cross_entropy.py
imports: import math
  from dataclasses import dataclass
  import torch.nn.functional
  from fairseq import utils
  from fairseq.logging import metrics
  from fairseq.criterions import FairseqCriterion, register_criterion
  from fairseq.dataclass import FairseqDataclass
  from omegaconf import II
label_desc: Use image node_id 1 to create a new CrossEntropyCriterion object from inherited base classes: FairseqCriterion with example: obj = CrossEntropyCriterion(task, sentence_avg)