Skip to content

Commit

Permalink
fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Oct 11, 2023
1 parent df2ac41 commit bef5926
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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)]
return self.dropout(x)


Expand Down
2 changes: 1 addition & 1 deletion doctr/models/recognition/crnn/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def _crnn(
_cfg["input_shape"] = kwargs["input_shape"]

# Build the model
model = CRNN(feat_extractor, cfg=_cfg, **kwargs) # type: ignore[arg-type]
model = CRNN(feat_extractor, cfg=_cfg, **kwargs)
# Load pretrained parameters
if pretrained:
# The number of classes is not the same as the number of classes in the pretrained model =>
Expand Down

0 comments on commit bef5926

Please sign in to comment.