class_docstr: Test Conv2D base class.
docstr: Generate reference data.
docstr_tok: ["Generate","reference","data","."]
code: def ref_data(
      self,
      dtype,
      batch,
      in_channel,
      in_size,
      num_filter,
      kernel,
      stride,
      padding,
      dilation,
  ):
      """Generate reference data."""
      in_height = in_width = in_size
      a_shape = (batch, in_height, in_width, in_channel)
      w_shape = (kernel, kernel, in_channel, num_filter)
  
      a_np = np.random.uniform(size=a_shape).astype(dtype)
      w_np = np.random.uniform(size=w_shape).astype(dtype)
      dw_np = tvm.topi.testing.dilate_python(
          w_np, (dilation, dilation, 1, 1)
      )
      b_np = tvm.topi.testing.conv2d_nhwc_python(
          a_np, dw_np, stride, padding
      )
      return a_np, w_np, b_np
  
file_path: tvm/tests/python/contrib/test_hexagon/topi/test_conv2d_nhwc.py
imports: import numpy
  import tvm
  import tvm.testing
  from tvm import topi
  from tvm import te
  from tvm.contrib.hexagon.session import Session
  import tvm.topi.testing
  from tvm.topi.utils import get_const_tuple
  from ..infrastructure import get_hexagon_target
label_desc: Use image node_id 1 for calling the BaseConv2DTests obj's underlying member method code with example usage: obj.ref_data(dtype, batch, in_channel, in_size, num_filter, kernel, stride, padding, dilation) and returns: a_np,  w_np,  b_np