Skip to content

Commit

Permalink
feat: ✨ PT fast base checkpoint (#1526)
Browse files Browse the repository at this point in the history
  • Loading branch information
odulcy-mindee authored Mar 26, 2024
1 parent cd16037 commit ed93683
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doctr/models/detection/fast/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"input_shape": (3, 1024, 1024),
"mean": (0.798, 0.785, 0.772),
"std": (0.264, 0.2749, 0.287),
"url": None,
"url": "https://doctr-static.mindee.com/models?id=v0.8.1/fast_base-688a8b34.pt&src=0",
},
}

Expand All @@ -58,9 +58,9 @@ def __init__(
out_channels: int = 128,
) -> None:
super().__init__()
self.reduction = nn.ModuleList(
[FASTConvLayer(in_channels * scale, out_channels, kernel_size=3) for scale in [1, 2, 4, 8]]
)
self.reduction = nn.ModuleList([
FASTConvLayer(in_channels * scale, out_channels, kernel_size=3) for scale in [1, 2, 4, 8]
])

def _upsample(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
return F.interpolate(x, size=y.shape[-2:], mode="bilinear")
Expand Down

0 comments on commit ed93683

Please sign in to comment.