@@ -175,12 +175,12 @@ Convergence Delta: tensor([2.3842e-07, -4.7684e-07])
175175The algorithm outputs an attribution score for each input element and a
176176convergence delta. The lower the absolute value of the convergence delta the better
177177is the approximation. If we choose not to return delta,
178- we can simply not provide ` return_convergence_delta ` input
178+ we can simply not provide the ` return_convergence_delta ` input
179179argument. The absolute value of the returned deltas can be interpreted as an
180180approximation error for each input sample.
181181It can also serve as a proxy of how accurate the integral approximation for given
182182inputs and baselines is.
183- If the approximation error is large, we can try larger number of integral
183+ If the approximation error is large, we can try a larger number of integral
184184approximation steps by setting ` n_steps ` to a larger value. Not all algorithms
185185return approximation error. Those which do, though, compute it based on the
186186completeness property of the algorithms.
@@ -224,7 +224,7 @@ in order to get per example average delta.
224224
225225
226226Below is an example of how we can apply ` DeepLift ` and ` DeepLiftShap ` on the
227- ` ToyModel ` described above. Current implementation of DeepLift supports only
227+ ` ToyModel ` described above. The current implementation of DeepLift supports only the
228228` Rescale ` rule.
229229For more details on alternative implementations, please see the [ DeepLift paper] ( https://arxiv.org/abs/1704.02685 ) .
230230
@@ -286,7 +286,7 @@ In order to smooth and improve the quality of the attributions we can run
286286to smoothen the attributions by aggregating them for multiple noisy
287287samples that were generated by adding gaussian noise.
288288
289- Here is an example how we can use ` NoiseTunnel ` with ` IntegratedGradients ` .
289+ Here is an example of how we can use ` NoiseTunnel ` with ` IntegratedGradients ` .
290290
291291``` python
292292ig = IntegratedGradients(model)
@@ -338,7 +338,7 @@ It is an extension of path integrated gradients for hidden layers and holds the
338338completeness property as well.
339339
340340It doesn't attribute the contribution scores to the input features
341- but shows the importance of each neuron in selected layer.
341+ but shows the importance of each neuron in the selected layer.
342342``` python
343343lc = LayerConductance(model, model.lin1)
344344attributions, delta = lc.attribute(input , baselines = baseline, target = 0 , return_convergence_delta = True )
0 commit comments