code: def test_batchnorm_testing_dnnl(self):
      dev = cpu_dev
  
      def _np_bn_testing(x, scale, bias, rm, rv, momentum=0.1, e=1e-5):
          channel = x.shape[1]
          np.testing.assert_array_almost_equal(
              scale.shape, (1, channel, 1, 1)
          )
          np.testing.assert_array_almost_equal(
              bias.shape, (1, channel, 1, 1)
          )
          np.testing.assert_array_almost_equal(
              rm.shape, (1, channel, 1, 1)
          )
          np.testing.assert_array_almost_equal(
              rv.shape, (1, channel, 1, 1)
          )
          return scale * (x - rm) / np.sqrt(rv + e) + bias
  
      def _run_testing(x_0, s_0, b_0, rm_0, rv_0, m_0=0.1):
          # np api
          y_1 = _np_bn_testing(x_0, s_0, b_0, rm_0, rv_0, momentum=m_0)
  
          # singa api
          hndl = singa_api.BatchNormHandle(
              m_0, tensor.Tensor(device=dev, data=x_0).data
          )
          y_2_c = singa_api.CpuBatchNormForwardInference(
              hndl,
              tensor.Tensor(device=dev, data=x_0).data,
              tensor.Tensor(device=dev, data=s_0).data,
              tensor.Tensor(device=dev, data=b_0).data,
              tensor.Tensor(device=dev, data=rm_0).data,
              tensor.Tensor(device=dev, data=rv_0).data,
          )
          # print(y_1)
          # print(tensor.to_numpy(_cTensor_to_pyTensor(y_2_c)))
  
          np.testing.assert_array_almost_equal(
              y_1,
              tensor.to_numpy(_cTensor_to_pyTensor(y_2_c)),
              decimal=5,
          )
          return
  
      x_0 = np.array(
          [1, 1, 1, 1, 2, 2, 2, 2, 10, 10, 10, 10, 20, 20, 20, 20],
          dtype=np.float32,
      ).reshape((2, 2, 2, 2))
      s_0 = np.array([1, 10], dtype=np.float32).reshape((1, 2, 1, 1))
      b_0 = np.array([1, 10], dtype=np.float32).reshape((1, 2, 1, 1))
      rm_0 = np.array([1, 10], dtype=np.float32).reshape((1, 2, 1, 1))
      rv_0 = np.array([1, 10], dtype=np.float32).reshape((1, 2, 1, 1))
      _run_testing(x_0, s_0, b_0, rm_0, rv_0, m_0=1.0)
      c = 10
      x_0 = np.random.random((10, c, 20, 20)).astype(np.float32)
      s_0 = np.random.random((1, c, 1, 1)).astype(np.float32)
      b_0 = np.random.random((1, c, 1, 1)).astype(np.float32)
      rm_0 = np.random.random((1, c, 1, 1)).astype(np.float32)
      rv_0 = np.random.random((1, c, 1, 1)).astype(np.float32)
      _run_testing(x_0, s_0, b_0, rm_0, rv_0, m_0=1.0)
  
imports: from __future__ import division
  import unittest
  import math
  import numpy
  from singa import singa_wrap
  from singa import tensor
  from cuda_helper import gpu_dev, cpu_dev
label_desc: Use image node_id 15 for calling the TestAPI obj's underlying member method code with example usage: obj.test_batchnorm_testing_dnnl() and returns: unknown