class_docstr: Tests for batch_ops.{un,}batch.
class_docstr_tok: ["Tests","for","batch_ops",".","{","un",",","}","batch","."]
docstr: Tests illegally feeding tensors with different dim0 sizes.
docstr_tok: ["Tests","illegally","feeding","tensors","with","different","dim0","sizes","."]
code: def testIllegalBatchDifferentDim0Sizes(self):
      """Tests illegally feeding tensors with different dim0 sizes."""
      if context.executing_eagerly():
          return
      with self.cached_session() as sess:
          inp0 = array_ops.placeholder(dtype=dtypes.int32, shape=[1])
          inp1 = array_ops.placeholder(dtype=dtypes.int32, shape=[2])
          batched, index, _ = batch_ops.batch(
              [inp0, inp1],
              num_batch_threads=1,
              max_batch_size=2,
              batch_timeout_micros=0,
              grad_timeout_micros=0,
              batching_queue="",
          )
          with self.assertRaises(Exception) as raised:
              _ = sess.run(
                  [batched, index], feed_dict={inp0: [0], inp1: [1, 2]}
              )
          self.assertGreater(
              raised.exception.message.find(
                  "must have equal 0th-dimension size"
              ),
              0,
          )
  
imports: import threading
  import time
  import numpy
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import function
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.framework.errors import InvalidArgumentError
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import batch_ops
  from tensorflow.python.ops import gen_batch_ops
  from tensorflow.python.ops import gen_functional_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import script_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the BatchOpsTest obj's underlying member method code with example usage: obj.testIllegalBatchDifferentDim0Sizes() without return types