@@ -102,40 +102,41 @@ def __init__(
102102 # Ignoring mypy error for inconsistent signature with DeepLift
103103 @typing .overload # type: ignore
104104 # pyre-fixme[43]: The implementation of `attribute` does not accept all possible
105- # arguments of overload defined on line `104 `.
105+ # arguments of overload defined on line `117 `.
106106 def attribute (
107107 self ,
108108 inputs : Union [Tensor , Tuple [Tensor , ...]],
109109 baselines : BaselineType = None ,
110110 target : TargetType = None ,
111111 # pyre-fixme[2]: Parameter annotation cannot be `Any`.
112112 additional_forward_args : Any = None ,
113- # pyre-fixme[9]: return_convergence_delta has type `Literal[]`; used as `bool`.
114- # pyre-fixme[31]: Expression `Literal[False ]` is not a valid type.
113+ * ,
114+ # pyre-fixme[31]: Expression `Literal[True ]` is not a valid type.
115115 # pyre-fixme[24]: Non-generic type `typing.Literal` cannot take parameters.
116- return_convergence_delta : Literal [False ] = False ,
116+ return_convergence_delta : Literal [True ] ,
117117 attribute_to_layer_input : bool = False ,
118118 custom_attribution_func : Union [None , Callable [..., Tuple [Tensor , ...]]] = None ,
119119 grad_kwargs : Optional [Dict [str , Any ]] = None ,
120- ) -> Union [Tensor , Tuple [Tensor , ...]]: ...
120+ ) -> Tuple [ Union [Tensor , Tuple [Tensor , ...]], Tensor ]: ...
121121
122122 @typing .overload
123123 # pyre-fixme[43]: The implementation of `attribute` does not accept all possible
124- # arguments of overload defined on line `117 `.
124+ # arguments of overload defined on line `104 `.
125125 def attribute (
126126 self ,
127127 inputs : Union [Tensor , Tuple [Tensor , ...]],
128128 baselines : BaselineType = None ,
129129 target : TargetType = None ,
130+ # pyre-fixme[2]: Parameter annotation cannot be `Any`.
130131 additional_forward_args : Any = None ,
131- * ,
132- # pyre-fixme[31]: Expression `Literal[True ]` is not a valid type.
132+ # pyre-fixme[9]: return_convergence_delta has type `Literal[]`; used as `bool`.
133+ # pyre-fixme[31]: Expression `Literal[False ]` is not a valid type.
133134 # pyre-fixme[24]: Non-generic type `typing.Literal` cannot take parameters.
134- return_convergence_delta : Literal [True ] ,
135+ return_convergence_delta : Literal [False ] = False ,
135136 attribute_to_layer_input : bool = False ,
136137 custom_attribution_func : Union [None , Callable [..., Tuple [Tensor , ...]]] = None ,
137138 grad_kwargs : Optional [Dict [str , Any ]] = None ,
138- ) -> Tuple [ Union [Tensor , Tuple [Tensor , ...]], Tensor ]: ...
139+ ) -> Union [Tensor , Tuple [Tensor , ...]]: ...
139140
140141 @log_usage ()
141142 # pyre-fixme[43]: This definition does not have the same decorators as the
@@ -452,7 +453,7 @@ def __init__(
452453 # Ignoring mypy error for inconsistent signature with DeepLiftShap
453454 @typing .overload # type: ignore
454455 # pyre-fixme[43]: The implementation of `attribute` does not accept all possible
455- # arguments of overload defined on line `439 `.
456+ # arguments of overload defined on line `453 `.
456457 def attribute (
457458 self ,
458459 inputs : Union [Tensor , Tuple [Tensor , ...]],
@@ -462,32 +463,33 @@ def attribute(
462463 target : TargetType = None ,
463464 # pyre-fixme[2]: Parameter annotation cannot be `Any`.
464465 additional_forward_args : Any = None ,
465- # pyre-fixme[9]: return_convergence_delta has type `Literal[]`; used as `bool`.
466- # pyre-fixme[31]: Expression `Literal[False ]` is not a valid type.
466+ * ,
467+ # pyre-fixme[31]: Expression `Literal[True ]` is not a valid type.
467468 # pyre-fixme[24]: Non-generic type `typing.Literal` cannot take parameters.
468- return_convergence_delta : Literal [False ] = False ,
469+ return_convergence_delta : Literal [True ] ,
469470 attribute_to_layer_input : bool = False ,
470471 custom_attribution_func : Union [None , Callable [..., Tuple [Tensor , ...]]] = None ,
471- ) -> Union [Tensor , Tuple [Tensor , ...]]: ...
472+ ) -> Tuple [ Union [Tensor , Tuple [Tensor , ...]], Tensor ]: ...
472473
473474 @typing .overload
474475 # pyre-fixme[43]: The implementation of `attribute` does not accept all possible
475- # arguments of overload defined on line `453 `.
476+ # arguments of overload defined on line `439 `.
476477 def attribute (
477478 self ,
478479 inputs : Union [Tensor , Tuple [Tensor , ...]],
479480 baselines : Union [
480481 Tensor , Tuple [Tensor , ...], Callable [..., Union [Tensor , Tuple [Tensor , ...]]]
481482 ],
482483 target : TargetType = None ,
484+ # pyre-fixme[2]: Parameter annotation cannot be `Any`.
483485 additional_forward_args : Any = None ,
484- * ,
485- # pyre-fixme[31]: Expression `Literal[True ]` is not a valid type.
486+ # pyre-fixme[9]: return_convergence_delta has type `Literal[]`; used as `bool`.
487+ # pyre-fixme[31]: Expression `Literal[False ]` is not a valid type.
486488 # pyre-fixme[24]: Non-generic type `typing.Literal` cannot take parameters.
487- return_convergence_delta : Literal [True ] ,
489+ return_convergence_delta : Literal [False ] = False ,
488490 attribute_to_layer_input : bool = False ,
489491 custom_attribution_func : Union [None , Callable [..., Tuple [Tensor , ...]]] = None ,
490- ) -> Tuple [ Union [Tensor , Tuple [Tensor , ...]], Tensor ]: ...
492+ ) -> Union [Tensor , Tuple [Tensor , ...]]: ...
491493
492494 @log_usage ()
493495 # pyre-fixme[43]: This definition does not have the same decorators as the
0 commit comments