Skip to content

Commit

Permalink
Fix layer activation pyre fixme issues
Browse files Browse the repository at this point in the history
Differential Revision: D67706972
  • Loading branch information
Vivek Miglani authored and facebook-github-bot committed Dec 30, 2024
1 parent 5f6173d commit dffd461
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions captum/attr/_core/layer/layer_activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class LayerActivation(LayerAttribution):

def __init__(
self,
# pyre-fixme[24]: Generic type `Callable` expects 2 type parameters.
forward_func: Callable,
forward_func: Callable[..., Union[int, float, Tensor]],
layer: ModuleOrModuleList,
device_ids: Union[None, List[int]] = None,
) -> None:
Expand Down Expand Up @@ -132,8 +131,6 @@ def attribute(
)
else:
return [
# pyre-fixme[6]: For 2nd argument expected `Tuple[Tensor, ...]` but
# got `Tensor`.
_format_output(len(single_layer_eval) > 1, single_layer_eval)
for single_layer_eval in layer_eval
]
Expand Down

0 comments on commit dffd461

Please sign in to comment.