code: def nll_loss(
      input,
      label,
      weight=None,
      ignore_index=-100,
      reduction="mean",
  ):
      """Refer
      https://pytorch.org/docs/stable/generated/torch.nn.NLLLoss.html#torch.nn.NLLLoss for
      more on NLL(Negative log likelihood) Loss."""
      if weight is None:
          weight = ivy.ones(ivy.shape(input[0]))
      input = ivy.log(input)
      loss = ivy.zeros(ivy.shape(label))
      den = 0
      for i in range(0, ivy.shape(loss)[0]):
          den = den + weight[label[i]]
          loss[i] = -weight[label[i]] * input[i][label[i]]
      output = 0.0
      if reduction == "sum":
          output = ivy.sum(loss)
          if ignore_index >= 0 and ignore_index < ivy.shape(input)[1]:
              output = output - loss[ignore_index]
          return output
      num = ivy.sum(loss)
      output = num / den
      if ignore_index >= 0 and ignore_index < ivy.shape(input)[1]:
          output = output - loss[ignore_index] / den
      return output
  
imports: import ivy
  from ivy.func_wrapper import with_supported_dtypes
  import ivy.functional.frontends.paddle
  from ivy.utils.exceptions import handle_exceptions
  from ivy.functional.frontends.paddle.func_wrapper import inputs_to_ivy_arrays, to_ivy_arrays_and_back
label_desc: Use image node_id 14 for calling a global function with example usage: nll_loss(input, label, weight, ignore_index, reduction) and returns: output, output