class_docstr: Perform gradients backpropagation for a given input
  
  Paper: [Deep Inside Convolutional Networks: Visualising Image Classification
      Models and Saliency Maps](https://arxiv.org/abs/1312.6034)
class_docstr_tok: ["Perform","gradients","backpropagation","for","a","given","input","Paper",":","[","Deep","Inside","Convolutional","Networks",":","Visualising","Image","Classification","Models","and","Saliency","Maps","]","(","https",":","\/\/arxiv.org\/abs\/1312.6034",")"]
docstr: Create a new model that excludes the final Softmax layer from the given model
  
  Args:
      model (tf.keras.Model): tf.keras model to base the new model on
  
  Returns:
      tf.keras.Model: A new model which excludes the last layer
docstr_tok: ["Create","a","new","model","that","excludes","the","final","Softmax","layer","from","the","given","model","Args",":","model","(","tf.keras.Model",")",":","tf.keras","model","to","base","the","new","model","on","Returns",":","tf.keras.Model",":","A","new","model","which","excludes","the","last","layer"]
code: def get_score_model(self, model):
      """
      Create a new model that excludes the final Softmax layer from the given model
  
      Args:
          model (tf.keras.Model): tf.keras model to base the new model on
  
      Returns:
          tf.keras.Model: A new model which excludes the last layer
      """
      activation_layer = model.layers[-1]
      if not self._is_activation_layer(activation_layer):
          warn(UNSUPPORTED_ARCHITECTURE_WARNING, stacklevel=3)
          return model
  
      output = activation_layer.input
  
      score_model = tf.keras.Model(inputs=model.inputs, outputs=output)
      return score_model
  
file_path: tf-explain/tf_explain/core/vanilla_gradients.py
imports: from warnings import warn
  import tensorflow
  from tf_explain.utils.display import grid_display
  from tf_explain.utils.image import transform_to_normalized_grayscale
  from tf_explain.utils.saver import save_grayscale
label_desc: Use image node_id 2 for calling the VanillaGradients obj's underlying member method code with example usage: obj.get_score_model(model) and returns: score_model, model