code: def kl_div(
      input: paddle.Tensor,
      target: paddle.Tensor,
      /,
      *,
      reduction: Optional[str] = "mean",
      log_target=False,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      if log_target:
          target = paddle.exp(target)
      loss = F.kl_div(input, target, reduction=reduction)
      return loss
  
file_path: ivy/ivy/functional/backends/paddle/experimental/losses.py
imports: from typing import Optional
  import paddle
  import paddle.nn.functional
  import math
  from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_supported_device_and_dtypes
  from .None import backend_version
label_desc: Use image node_id 5 for calling a global function with example usage: kl_div() and returns: loss