docstr: Test MovingAverage.
docstr_tok: ["Test","MovingAverage","."]
code: def test_MovingAverage(self):
      """Test MovingAverage."""
      x1 = jn.array([[0, 1, 2]])
      x2 = jn.array([[0, 0, 0]])
      x3 = jn.array([[-3, -4, 5]])
      init_value = 100
      shape = x1.shape
      ma = objax.nn.MovingAverage(
          shape=shape, buffer_size=2, init_value=init_value
      )
  
      x_ma1 = ma(x1)
      x_ma2 = ma(x2)
      x_ma3 = ma(x3)
  
      np.testing.assert_allclose(x_ma1, np.array([[50, 50.5, 51]]))
      np.testing.assert_allclose(x_ma2, np.array([[0, 0.5, 1]]))
      np.testing.assert_allclose(x_ma3, np.array([[-1.5, -2, 2.5]]))
  
file_path: objax/tests/nn_moving_average.py
imports: import unittest
  import jax.numpy
  import numpy
  import objax
label_desc: Use image node_id 1 for calling the TestMovingAverage obj's underlying member method code with example usage: obj.test_MovingAverage() without return types