Skip to content

Commit dcbb21f

Browse files
disable pretrained backbone by default (#1080)
1 parent 147b60b commit dcbb21f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doctr/models/recognition/vitstr/pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def _vitstr(
182182
pretrained: bool,
183183
backbone_fn: Callable[[bool], nn.Module],
184184
layer: str,
185-
pretrained_backbone: bool = True,
185+
pretrained_backbone: bool = False, # NOTE: training from scratch without a pretrained backbone works better
186186
ignore_keys: Optional[List[str]] = None,
187187
**kwargs: Any,
188188
) -> ViTSTR:

doctr/models/recognition/vitstr/tensorflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _vitstr(
186186
arch: str,
187187
pretrained: bool,
188188
backbone_fn,
189-
pretrained_backbone: bool = True,
189+
pretrained_backbone: bool = False, # NOTE: training from scratch without a pretrained backbone works better
190190
input_shape: Optional[Tuple[int, int, int]] = None,
191191
**kwargs: Any,
192192
) -> ViTSTR:

0 commit comments

Comments
 (0)