Skip to content

Commit aea3b9c

Browse files
seefunrwightman
authored andcommitted
Fixing tinyvit input_size issue
1 parent fabc4e5 commit aea3b9c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

timm/models/tiny_vit.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ def _cfg(url='', **kwargs):
624624
'classifier': 'head.fc',
625625
'fixed_input_size': True,
626626
'pool_size': None,
627+
'input_size': (3, 224, 224),
627628
**kwargs,
628629
}
629630

@@ -660,10 +661,12 @@ def _cfg(url='', **kwargs):
660661
url='https://github.com/wkcn/TinyViT-model-zoo/releases/download/checkpoints/tiny_vit_21m_1k.pth'
661662
),
662663
'tiny_vit_21m_384.dist_in22k_ft_in1k': _cfg(
663-
url='https://github.com/wkcn/TinyViT-model-zoo/releases/download/checkpoints/tiny_vit_21m_22kto1k_384_distill.pth'
664+
url='https://github.com/wkcn/TinyViT-model-zoo/releases/download/checkpoints/tiny_vit_21m_22kto1k_384_distill.pth',
665+
input_size=(3, 384, 384)
664666
),
665667
'tiny_vit_21m_512.dist_in22k_ft_in1k': _cfg(
666-
url='https://github.com/wkcn/TinyViT-model-zoo/releases/download/checkpoints/tiny_vit_21m_22kto1k_512_distill.pth'
668+
url='https://github.com/wkcn/TinyViT-model-zoo/releases/download/checkpoints/tiny_vit_21m_22kto1k_512_distill.pth',
669+
input_size=(3, 512, 512)
667670
),
668671
})
669672

0 commit comments

Comments
 (0)