import tensorflow as tf

  """
  To run:
  "python -m saliency.integrated_gradients_test" from the PAIR-code/saliency
  directory.
  """

  def testIntegratedGradientsGetMask(self):
    with tf.Graph().as_default() as graph:
      x = tf.placeholder(shape=[None, 3], dtype=tf.float32)
      y = 5 * x[:, 0] + x[:, 0] * x[:, 1] + tf.sin(x[:, 2])
      with tf.Session() as sess:
        # Calculate the value of `y` at the baseline.
        x_baseline_val = np.array([[0.5, 0.8, 1.0]], dtype=np.float)
        y_baseline_val = sess.run(y, feed_dict={x: x_baseline_val})

        # Calculate the value of `y` at the input.
