  def testMaxPoolGradEagerShapeErrors(self):
    with context.eager_mode():
      orig_in = array_ops.ones((1, 1, 1, 1, 1))

      # Test invalid orig_out shape
      orig_out = array_ops.ones((1, 1, 1, 1, 2))
      grad = array_ops.ones((1, 1, 1, 1, 1))
      with self.assertRaisesRegex(
          errors_impl.InvalidArgumentError,
          r"Expected orig_output shape to be \[1,1,1,1,1\], but got "
          r"\[1,1,1,1,2\]"):
        gen_nn_ops.max_pool3d_grad(
            orig_in, orig_out, grad, ksize=[1, 1, 1, 1, 1],
            strides=[1, 1, 1, 1, 1], padding="VALID")
      with self.assertRaisesRegex(
          errors_impl.InvalidArgumentError,
          r"Expected orig_output shape to be \[1,1,1,1,1\], but got "
          r"\[1,1,1,1,2\]"):
        gen_nn_ops.max_pool3d_grad_grad(
            orig_in, orig_out, grad, ksize=[1, 1, 1, 1, 1],
            strides=[1, 1, 1, 1, 1], padding="VALID")

      # Test invalid grad shape
      orig_out = array_ops.ones((1, 1, 1, 1, 1))
      grad = array_ops.ones((1, 1, 1, 1, 2))
      with self.assertRaisesRegex(
          errors_impl.InvalidArgumentError,
          r"Expected grad shape to be \[1,1,1,1,1\], but got \[1,1,1,1,2\]"):
        gen_nn_ops.max_pool3d_grad(
            orig_in, orig_out, grad, ksize=[1, 1, 1, 1, 1],
            strides=[1, 1, 1, 1, 1], padding="VALID")
      with self.assertRaisesRegex(
          errors_impl.InvalidArgumentError,
          r"Expected grad shape to be \[1,1,1,1,1\], but got \[1,1,1,1,2\]"):
        gen_nn_ops.max_pool3d_grad_grad(
            orig_in, orig_out, grad, ksize=[1, 1, 1, 1, 1],
            strides=[1, 1, 1, 1, 1], padding="VALID")
The software does not validate or incorrectly validates the integrity check values or "checksums" of a message. This may prevent it from detecting if the data has been modified or corrupted in transmission.