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