code: def testConvExpandedBatch(self):
      tensor_in_sizes_batch = [10, 2, 3, 1, 3]
      tensor_in_sizes_expanded_batch = [2, 5, 2, 3, 1, 3]
      batch_dims = 2
      filter_in_sizes = [1, 1, 1, 3, 3]
      filter_in = np.arange(
          1, np.prod(filter_in_sizes) + 1, dtype=np.float32
      ).reshape(filter_in_sizes)
      x1 = np.arange(
          1, np.prod(tensor_in_sizes_batch) + 1, dtype=np.float32
      ).reshape(tensor_in_sizes_batch)
      x2 = x1.reshape(tensor_in_sizes_expanded_batch)
  
      with self.session() as sess:
          t1 = array_ops.placeholder(
              dtypes.bfloat16, shape=tensor_in_sizes_batch
          )
          t2 = array_ops.placeholder(
              dtypes.bfloat16, shape=tensor_in_sizes_expanded_batch
          )
          filter_t = array_ops.placeholder(
              dtypes.bfloat16, shape=filter_in_sizes
          )
  
          out1 = gen_nn_ops.conv(
              t1, filter_t, strides=[1, 1, 1, 1, 1], padding="VALID"
          )
          out2 = gen_nn_ops.conv(
              t2,
              filter_t,
              strides=[1, 1, 1, 1, 1],
              padding="VALID",
              batch_dims=batch_dims,
          )
          value1 = sess.run(out1, {t1: x1, filter_t: filter_in})
          value2 = sess.run(out2, {t2: x2, filter_t: filter_in})
  
          self.assertEqual(list(value1.shape), tensor_in_sizes_batch)
          self.assertEqual(
              list(value2.shape), tensor_in_sizes_expanded_batch
          )
          self.assertAllCloseAccordingToType(
              value1, value2.reshape(value1.shape)
          )
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import test_utils
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gen_nn_ops
  from tensorflow.python.ops import gradient_checker
  from tensorflow.python.ops import nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 12 for calling the Conv3DTest obj's underlying member method code with example usage: obj.testConvExpandedBatch() without return types