from tensorflow.python.platform import googletest

        # the `y` value at the input and the `y` value at the baseline.
        expected_val = y_input_val[0] - y_baseline_val[0]

        # Calculate the integrated gradients attribution of the input.
        ig = integrated_gradients.IntegratedGradients(graph, sess, y[0], x)
        mask = ig.GetMask(x_value=x_input_val[0], feed_dict={},
                          x_baseline=x_baseline_val[0], x_steps=1000)

        # Verify the result.
        self.assertAlmostEqual(expected_val, mask.sum(), places=3)


if __name__ == '__main__':
  googletest.main()
