Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ PT fast base checkpoint #1526

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: ✨ PT fast base checkpoint
  • Loading branch information
odulcy-mindee committed Mar 26, 2024
commit 47e6e00e7ecab41411d01bc4883b7df12216b711
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
Loading