Skip to content

Commit

Permalink
disable pretrained backbone by default (#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 authored Sep 29, 2022
1 parent 147b60b commit dcbb21f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doctr/models/recognition/vitstr/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def _vitstr(
pretrained: bool,
backbone_fn: Callable[[bool], nn.Module],
layer: str,
pretrained_backbone: bool = True,
pretrained_backbone: bool = False, # NOTE: training from scratch without a pretrained backbone works better
ignore_keys: Optional[List[str]] = None,
**kwargs: Any,
) -> ViTSTR:
Expand Down
2 changes: 1 addition & 1 deletion doctr/models/recognition/vitstr/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _vitstr(
arch: str,
pretrained: bool,
backbone_fn,
pretrained_backbone: bool = True,
pretrained_backbone: bool = False, # NOTE: training from scratch without a pretrained backbone works better
input_shape: Optional[Tuple[int, int, int]] = None,
**kwargs: Any,
) -> ViTSTR:
Expand Down

0 comments on commit dcbb21f

Please sign in to comment.