Skip to content

Commit

Permalink
mypy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Oct 5, 2023
1 parent 2e30672 commit 1cff3ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doctr/models/modules/transformer/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
Returns:
positional embeddings (batch, max_len, d_model)
"""
x = x + self.pe[:, : x.size(1)] # type: ignore
x = x + self.pe[:, : x.size(1)] # type: ignore[index]
return self.dropout(x)


Expand Down

0 comments on commit 1cff3ca

Please sign in to comment.