message: Use eager-friendly evaluate for batch_gather_op_test.
diff: @@ -88,13 +88,13 @@ class GatherTest(test.TestCase, parameterized.TestCase):
  self.assertAllEqual(np_val, gather_val)
  self.assertEqual(np_val.shape, gather_t.get_shape())
  - @test_util.run_deprecated_v1
  def testString(self):
  params = np.array([[b"asdf", b"zxcv"], [b"qwer", b"uiop"]])
  with self.cached_session():
  indices_tf = constant_op.constant([1])
  - self.assertAllEqual([[b"qwer", b"uiop"]],
  - array_ops.batch_gather(params, indices_tf).eval())
  + self.assertAllEqual(
  + [[b"qwer", b"uiop"]],
  + self.evaluate(array_ops.batch_gather(params, indices_tf)))
  @test_util.run_deprecated_v1
  def testUnknownIndices(self):
  @@ -107,17 +107,17 @@ class GatherTest(test.TestCase, parameterized.TestCase):
  with self.session(use_gpu=False):
  params = [[0, 1, 2], [3, 4, 5]]
  with self.assertRaisesOpError(r"indices\[0\] = 7 is not in \[0, 2\)"):
  - array_ops.batch_gather(params, [7]).eval()
  + self.evaluate(array_ops.batch_gather(params, [7]))
  - @test_util.run_deprecated_v1
  def testEmptySlices(self):
  with self.session(use_gpu=True):
  for dtype in _TEST_TYPES:
  for itype in np.int32, np.int64:
  params = np.zeros((7, 0, 0), dtype=dtype.as_numpy_dtype)
  indices = np.array([3, 4], dtype=itype)
  - gather = array_ops.batch_gather(params, indices)
  - self.assertAllEqual(gather.eval(), np.zeros((2, 0, 0)))
  + self.assertAllEqual(
  + self.evaluate(array_ops.batch_gather(params, indices)),
  + np.zeros((2, 0, 0)))
  if __name__ == "__main__":
  test.main()
  