code: def criterion(inputs, target):
      losses = {}
      for name, x in inputs.items():
          # 忽略target中值为255的像素，255的像素是目标边缘或者padding填充
          losses[name] = nn.functional.cross_entropy(
              x, target, ignore_index=255
          )
  
      if len(losses) == 1:
          return losses["out"]
  
      return losses["out"] + 0.5 * losses["aux"]
  
imports: import torch
  from torch import nn
  import train_utils.distributed_utils
label_desc: Use image node_id 1 for calling a global function with example usage: criterion(inputs, target) and returns: unknown, losses