docstr: Test mean absolute error on x and y.
docstr_tok: ["Test","mean","absolute","error","on","x","and","y","."]
code: def test_on_mae(self):
      """Test mean absolute error on x and y."""
      x = jn.array(
          [
              [0.76, 0.38, 0.51, 0.59],
              [0.89, 0.76, 0.17, 0.19],
              [0.14, 0.29, 0.49, 0.55],
          ]
      )
      y = jn.array(
          [[1, 0, 4, 3], [4, 0, 4, 3], [0, 0, 0, 2]], dtype=jn.uint32
      )
      e = objax.functional.loss.mean_absolute_error(x, y, None)
      gold = jn.array(1.6166668)
      self.assertAlmostEqual(
          jn.abs(e - gold).sum(), 0, delta=ERROR_TOLERANCE
      )
      e = objax.functional.loss.mean_absolute_error(x, y)
      gold = jn.array([1.6300001, 2.6275, 0.59250003])
      self.assertAlmostEqual(
          jn.abs(e - gold).sum(), 0, delta=ERROR_TOLERANCE
      )
      e = objax.functional.loss.mean_absolute_error(x, y, (1,))
      gold = jn.array([1.1633334, 0.47666666, 2.6033332, 2.2233334])
      self.assertAlmostEqual(
          jn.abs(e - gold).sum(), 0, delta=ERROR_TOLERANCE
      )
  
file_path: objax/tests/loss.py
imports: import unittest
  import jax.numpy
  import objax
label_desc: Use image node_id 1 for calling the TestLoss obj's underlying member method code with example usage: obj.test_on_mae() without return types