torch.nn.functional.kl_div
torch.nn.functional.kl_div(input, target, size_average=None, reduce=None, reduction='mean', log_target=False)
The Kullback-Leibler divergence Loss
See "KLDivLoss" for details.
Parameters:
      * input (Tensor) -- Tensor of arbitrary shape in log-
        probabilities.
  * **target** (*Tensor*) -- Tensor of the same shape as input.
    See "log_target" for the target's interpretation.

  * **size_average** (*bool**, **optional*) -- Deprecated (see
    "reduction"). By default, the losses are averaged over each
    loss element in the batch. Note that for some losses, there
    multiple elements per sample. If the field "size_average" is
    set to "False", the losses are instead summed for each
    minibatch. Ignored when reduce is "False". Default: "True"

  * **reduce** (*bool**, **optional*) -- Deprecated (see
    "reduction"). By default, the losses are averaged or summed
