@@ -144,22 +144,23 @@ def attribute(
144144 Default: False
145145
146146 Returns:
147-
148- attributions (tensor or tuple of tensors): Attribution score
149- computed based on DeepLift rescale rule with respect
150- to each input feature. Attributions will always be
151- the same size as the provided inputs, with each value
152- providing the attribution of the corresponding input index.
153- If a single tensor is provided as inputs, a single tensor is
154- returned. If a tuple is provided for inputs, a tuple of
155- corresponding sized tensors is returned.
156- delta (tensor, optional): This is computed using the property that the total
157- sum of forward_func(inputs) - forward_func(baselines)
158- must equal the total sum of the attributions computed
159- based on Deeplift's rescale rule.
160- Delta is calculated per example, meaning that the number of
161- elements in returned delta tensor is equal to the number of
162- of examples in input.
147+ **attributions** or 2-element tuple of **attributions**, **delta**:
148+ - **attributions** (*tensor* or tuple of *tensors*):
149+ Attribution score computed based on DeepLift rescale rule with respect
150+ to each input feature. Attributions will always be
151+ the same size as the provided inputs, with each value
152+ providing the attribution of the corresponding input index.
153+ If a single tensor is provided as inputs, a single tensor is
154+ returned. If a tuple is provided for inputs, a tuple of
155+ corresponding sized tensors is returned.
156+ - **delta** (*tensor*, returned if return_convergence_delta=True):
157+ This is computed using the property that
158+ the total sum of forward_func(inputs) - forward_func(baselines)
159+ must equal the total sum of the attributions computed
160+ based on Deeplift's rescale rule.
161+ Delta is calculated per example, meaning that the number of
162+ elements in returned delta tensor is equal to the number of
163+ of examples in input.
163164
164165 Examples::
165166
@@ -435,16 +436,17 @@ def attribute(
435436 Default: False
436437
437438 Returns:
438-
439- attributions ( tensor or tuple of tensors): Attribution score
440- computed based on DeepLift rescale rule with respect
441- to each input feature. Attributions will always be
439+ **attributions** or 2-element tuple of **attributions**, **delta**:
440+ - ** attributions** (* tensor* or tuple of * tensors*):
441+ Attribution score computed based on DeepLift rescale rule with
442+ respect to each input feature. Attributions will always be
442443 the same size as the provided inputs, with each value
443444 providing the attribution of the corresponding input index.
444445 If a single tensor is provided as inputs, a single tensor is
445446 returned. If a tuple is provided for inputs, a tuple of
446447 corresponding sized tensors is returned.
447- delta (tensor, optional): This is computed using the property that the
448+ - **delta** (*tensor*, returned if return_convergence_delta=True):
449+ This is computed using the property that the
448450 total sum of forward_func(inputs) - forward_func(baselines)
449451 must be very close to the total sum of attributions
450452 computed based on approximated SHAP values using
0 commit comments