• Hu Ye's avatar
    Adding Swin Transformer architecture (#5491) · e288f6ca
    Hu Ye authored
    
    
    * add swin transformer
    
    * Update swin_transformer.py
    
    * Update swin_transformer.py
    
    * fix lint
    
    * fix lint
    
    * refactor code
    
    * add swin_transformer
    
    * Update swin_transformer.py
    
    * fix bug
    
    * refactor code
    
    * fix lint
    
    * update init_weights
    
    * move shift_window into attention
    
    * refactor code
    
    * fix bug
    
    * Update swin_transformer.py
    
    * Update swin_transformer.py
    
    * fix lint
    
    * add patch_merge
    
    * fix bug
    
    * Update swin_transformer.py
    
    * Update swin_transformer.py
    
    * Update swin_transformer.py
    
    * refactor code
    
    * Update swin_transformer.py
    
    * refactor code
    
    * fix lint
    
    * refactor code
    
    * add swin_tiny
    
    * add swin_tiny.pkl
    
    * fix lint
    
    * Delete ModelTester.test_swin_tiny_expect.pkl
    
    * add swin_tiny
    
    * add
    
    * add Optional to bias
    
    * update init weights
    
    * update init_weights and add no weight decay
    
    * add no weight decay
    
    * add set_weight_decay
    
    * add set_weight_decay
    
    * fix lint
    
    * fix lint
    
    * add lr_cos_min
    
    * add other swin models
    
    * Update torchvision/models/swin_transformer.py
    Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
    
    * refactor doc
    
    * Update utils.py
    
    * Update train.py
    
    * Update train.py
    
    * Update swin_transformer.py
    
    * update model builder
    
    * fix lint
    
    * add
    
    * Update torchvision/models/swin_transformer.py
    Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
    
    * Update torchvision/models/swin_transformer.py
    Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
    
    * update other model
    
    * simplify the model name just like ViT
    
    * add lr_cos_min
    
    * fix lint
    
    * fix lint
    
    * Update swin_transformer.py
    
    * Update swin_transformer.py
    
    * Update swin_transformer.py
    
    * Delete ModelTester.test_swin_tiny_expect.pkl
    
    * add swin_t
    
    * refactor code
    
    * Update train.py
    
    * add swin_s
    
    * ignore a error of mypy
    
    * Update swin_transformer.py
    
    * fix lint
    
    * add swin_b
    
    * add swin_l
    
    * refactor code
    
    * Update train.py
    
    * move relative_position_bias to __init__
    
    * fix formatting
    
    * Revert "fix formatting"
    
    This reverts commit 41faba232668f7ac4273a0cf632c0d0130c7ce9c.
    
    * Revert "move relative_position_bias to __init__"
    
    This reverts commit f0615440bf18617dc0e5dc4839bd5ed27e5ed010.
    
    * refactor code
    
    * Remove deprecated meta-data from `_COMMON_META`
    
    * fix linter
    
    * add pretrained weights for swin_t
    
    * fix format
    
    * apply ufmt
    
    * add documentation
    
    * update references README
    
    * adding new style docs
    
    * update pre-trained weights values
    
    * remove other variants
    
    * fix typo
    
    * Remove expect for the variants not yet supported
    Co-authored-by: default avatarVasilis Vryniotis <datumbox@users.noreply.github.com>
    Co-authored-by: default avatarJoao Gomes <jdsgomes@fb.com>
    e288f6ca
README.md 13.3 KB