code: def test_torch_MAE():
      from zoo.orca.learn.pytorch.pytorch_metrics import MAE
  
      pred = torch.tensor([[1, -2], [1, 1]])
      target = torch.tensor([[0, 1], [0, 1]])
      m = MAE()
      m(pred, target)
      assert m.compute() == 1.25
      pred = torch.tensor([[1, 1], [1, 1]])
      target = torch.tensor([[0, 1], [0, 1]])
      m(pred, target)
      assert m.compute() == 0.875
      pred = torch.tensor([[1.5, 2.5], [1.0, 1.0]])
      target = torch.tensor([[0.2, 1.1], [0.5, 1.0]])
      m(pred, target)
      assert (
          abs(m.compute() - 0.85) < 1e-7
      )  # add fault tolerance for floating point precision
      pred = torch.tensor([[1.5, 2.5, 1.5, 2.5], [1.8, 2.0, 0.5, 4.5]])
      target = torch.tensor([[0, 1, 0, 0], [0, 1, 2, 2]])
      m(pred, target)
      assert abs(m.compute() - 1.2) < 1e-7
  
file_path: analytics-zoo/pyzoo/test/zoo/orca/learn/test_metrics.py
imports: import torch
label_desc: Use image node_id 6 for calling a global function with example usage: test_torch_MAE() without return types