Skip to content

Commit

Permalink
Fix custom modules pyre fix me issues
Browse files Browse the repository at this point in the history
Differential Revision: D67706756
  • Loading branch information
Vivek Miglani authored and facebook-github-bot committed Dec 30, 2024
1 parent 7f0d45e commit 51940e3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions captum/attr/_utils/custom_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# pyre-strict
import torch.nn as nn
from torch import Tensor


class Addition_Module(nn.Module):
Expand All @@ -12,7 +13,5 @@ class Addition_Module(nn.Module):
def __init__(self) -> None:
super().__init__()

# pyre-fixme[3]: Return type must be annotated.
# pyre-fixme[2]: Parameter must be annotated.
def forward(self, x1, x2):
def forward(self, x1: Tensor, x2: Tensor) -> Tensor:
return x1 + x2

0 comments on commit 51940e3

Please sign in to comment.