code: def test_torch_CategoricalCrossEntropy():
      from bigdl.orca.learn.pytorch.pytorch_metrics import (
          CategoricalCrossEntropy,
      )
  
      pred = torch.tensor([[0.05, 0.95, 0], [0.1, 0.8, 0.1]])
      target = torch.tensor([[0, 1, 0], [0, 0, 1]])
      entropy = CategoricalCrossEntropy()
      entropy(pred, target)
      assert abs(entropy.compute() - 1.1769392) < 1e-6
  
file_path: BigDL/python/orca/test/bigdl/orca/learn/test_metrics.py
imports: import torch
  import pytest
label_desc: Use image node_id 9 for calling a global function with example usage: test_torch_CategoricalCrossEntropy() without return types