Skip to content

Commit c5a8e92

Browse files
committed
Add initial swinv2 tiny / small weights
1 parent 83d7a11 commit c5a8e92

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

timm/models/helpers.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,6 @@ def load_custom_pretrained(
172172
pretrained_cfg (dict): Default pretrained model cfg
173173
load_fn: An external stand alone fn that loads weights into provided model, otherwise a fn named
174174
'laod_pretrained' on the model will be called if it exists
175-
progress (bool, optional): whether or not to display a progress bar to stderr. Default: False
176-
check_hash(bool, optional): If True, the filename part of the URL should follow the naming convention
177-
``filename-<sha256>.ext`` where ``<sha256>`` is the first eight or more
178-
digits of the SHA256 hash of the contents of the file. The hash is used to
179-
ensure unique names and to verify the contents of the file. Default: False
180175
"""
181176
pretrained_cfg = pretrained_cfg or getattr(model, 'pretrained_cfg', None) or {}
182177
load_from, pretrained_loc = _resolve_pretrained_source(pretrained_cfg)

timm/models/swin_transformer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def _cfg(url='', **kwargs):
4646

4747

4848
default_cfgs = {
49-
# patch models (my experiments)
5049
'swin_base_patch4_window12_384': _cfg(
5150
url='https://github.com/SwinTransformer/storage/releases/download/v1.0.0/swin_base_patch4_window12_384_22kto1k.pth',
5251
input_size=(3, 384, 384), crop_pct=1.0),

timm/models/swin_transformer_v2_cr.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,18 @@ def _cfg(url='', **kwargs):
6464

6565

6666
default_cfgs = {
67-
# patch models (my experiments)
6867
'swin_v2_cr_tiny_384': _cfg(
6968
url="", input_size=(3, 384, 384), crop_pct=1.0),
7069
'swin_v2_cr_tiny_224': _cfg(
7170
url="", input_size=(3, 224, 224), crop_pct=0.9),
7271
'swin_v2_cr_tiny_ns_224': _cfg(
73-
url="", input_size=(3, 224, 224), crop_pct=0.9),
72+
url="https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights-swinv2/swin_v2_cr_tiny_ns_224-ba8166c6.pth",
73+
input_size=(3, 224, 224), crop_pct=0.9),
7474
'swin_v2_cr_small_384': _cfg(
7575
url="", input_size=(3, 384, 384), crop_pct=1.0),
7676
'swin_v2_cr_small_224': _cfg(
77-
url="", input_size=(3, 224, 224), crop_pct=0.9),
77+
url="https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights-swinv2/swin_v2_cr_small_224-0813c165.pth",
78+
input_size=(3, 224, 224), crop_pct=0.9),
7879
'swin_v2_cr_base_384': _cfg(
7980
url="", input_size=(3, 384, 384), crop_pct=1.0),
8081
'swin_v2_cr_base_224': _cfg(

0 commit comments

Comments
 (0)