Skip to content

simple_gradient

[ allennlp.interpret.saliency_interpreters.simple_gradient ]


SimpleGradient Objects#

class SimpleGradient(SaliencyInterpreter)

Registered as a SaliencyInterpreter with name "simple-gradient".

saliency_interpret_from_json#

 | def saliency_interpret_from_json(self, inputs: JsonDict) -> JsonDict

Interprets the model's prediction for inputs. Gets the gradients of the loss with respect to the input and returns those gradients normalized and sanitized.