class_docstr: To run: "python -m saliency.tf1.xrai_test" from top-level saliency directory.
class_docstr_tok: ["To","run",":","``","python","-m","saliency.tf1.xrai_test","''","from","top-level","saliency","directory","."]
code: def setUp(self):
      super().setUp()
      self.graph = tf.Graph()
      with self.graph.as_default():
          x = tf.placeholder(shape=[None, 3], dtype=tf.float32)
          contrib = [5 * x[:, 0], x[:, 1] * x[:, 1], 2 * x[:, 2]]
          y = contrib[0] + contrib[1] + contrib[2]
          sess = tf.Session(graph=self.graph)
          self.sess_spy = mock.MagicMock(wraps=sess)
  
          # Calculate the integrated gradients attribution of the input.
          self.x = x
          self.y = y
          self.x_indexed = x[0]
          self.y_indexed = x[0]
  
file_path: saliency/saliency/tf1/xrai_test.py
imports: import unittest
  import unittest.mock
  from .None import xrai
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the XRAITest obj's underlying member method code with example usage: obj.setUp() without return types