class_docstr: A TF1CoreSaliency class that computes saliency masks with Grad-CAM.
  
  https://arxiv.org/abs/1610.02391
  
  Example usage (based on Examples.ipynb):
  
  grad_cam = GradCam(graph, sess, x=x, conv_layer=conv_layer)
  mask = grad_cam.GetMask(im,
                          should_resize = False,
                          three_dims = False)
  
  The Grad-CAM paper suggests using the last convolutional layer, which would
  be 'Mixed_5c' in inception_v2 and 'Mixed_7c' in inception_v3.
class_docstr_tok: ["A","TF1CoreSaliency","class","that","computes","saliency","masks","with","Grad-CAM",".","https",":","\/\/arxiv.org\/abs\/1610.02391","Example","usage","(","based","on","Examples.ipynb",")",":","grad_cam","=","GradCam","(","graph",",","sess",",","x=x",",","conv_layer=conv_layer",")","mask","=","grad_cam.GetMask","(","im",",","should_resize","=","False",",","three_dims","=","False",")","The","Grad-CAM","paper","suggests","using","the","last","convolutional","layer",",","which","would","be","'Mixed_5c","'","in","inception_v2","and","'Mixed_7c","'","in","inception_v3","."]
docstr: Returns a GradCAM mask.
  
  Args:
    x_value: Input value, not batched.
    feed_dict: (Optional) feed dictionary to pass to the session.run call.
    should_resize: boolean that determines whether a low-res Grad-CAM mask
      should be upsampled to match the size of the input image
    three_dims: boolean that determines whether the grayscale mask should be
      converted into a 3D mask by copying the 2D mask value's into each color
      channel
docstr_tok: ["Returns","a","GradCAM","mask",".","Args",":","x_value",":","Input","value",",","not","batched",".","feed_dict",":","(","Optional",")","feed","dictionary","to","pass","to","the","session.run","call",".","should_resize",":","boolean","that","determines","whether","a","low-res","Grad-CAM","mask","should","be","upsampled","to","match","the","size","of","the","input","image","three_dims",":","boolean","that","determines","whether","the","grayscale","mask","should","be","converted","into","a","3D","mask","by","copying","the","2D","mask","value","'s","into","each","color","channel"]
code: def GetMask(
      self, x_value, feed_dict=None, should_resize=True, three_dims=True
  ):
      """Returns a GradCAM mask.
  
      Args:
        x_value: Input value, not batched.
        feed_dict: (Optional) feed dictionary to pass to the session.run call.
        should_resize: boolean that determines whether a low-res Grad-CAM mask
          should be upsampled to match the size of the input image
        three_dims: boolean that determines whether the grayscale mask should be
          converted into a 3D mask by copying the 2D mask value's into each color
          channel
      """
      return self.core_instance.GetMask(
          x_value,
          self.call_model_function,
          call_model_args=feed_dict,
          should_resize=should_resize,
          three_dims=three_dims,
      )
  
imports: from .base import TF1CoreSaliency
  from ..core import grad_cam
label_desc: Use image node_id 2 for calling the GradCam obj's underlying member method code with example usage: obj.GetMask(x_value, feed_dict, should_resize, three_dims) and returns: self