code: def test_torch_KLDivergence():
      from zoo.orca.learn.pytorch.pytorch_metrics import KLDivergence
  
      pred = torch.tensor([[0.6, 0.4], [0.4, 0.6]])
      target = torch.tensor([[0, 1], [0, 0]])
      div = KLDivergence()
      div(pred, target)
      assert abs(div.compute() - 0.45814) < 1e-5
  
file_path: analytics-zoo/pyzoo/test/zoo/orca/learn/test_metrics.py
imports: import torch
label_desc: Use image node_id 11 for calling a global function with example usage: test_torch_KLDivergence() without return types