Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ba96431
padding done
FrancescoSaverioZuppichini Mar 7, 2022
9edd61d
correctly return one attention per layer
FrancescoSaverioZuppichini Mar 8, 2022
c239848
almost correct, attentions are not flatten one tuple per stage
FrancescoSaverioZuppichini Mar 8, 2022
09e4661
tests green
FrancescoSaverioZuppichini Mar 8, 2022
91be4b7
doc
FrancescoSaverioZuppichini Mar 8, 2022
8d6022f
conversations
FrancescoSaverioZuppichini Mar 9, 2022
f2b0d3d
reshaping hidden_states
FrancescoSaverioZuppichini Mar 9, 2022
bfa25a9
view in the test
FrancescoSaverioZuppichini Mar 11, 2022
d7abc4d
reshape_hidden_states in Encoder and Model
FrancescoSaverioZuppichini Mar 11, 2022
fbd07d3
new outputs with reshaped_hidden_states
FrancescoSaverioZuppichini Mar 11, 2022
e4b4db9
conversations
FrancescoSaverioZuppichini Mar 12, 2022
7719aaf
doc
FrancescoSaverioZuppichini Mar 14, 2022
f0311de
Update docs/source/model_doc/swin.mdx
FrancescoSaverioZuppichini Mar 15, 2022
b7c5dd2
Apply suggestions from code review
FrancescoSaverioZuppichini Mar 15, 2022
906df50
conversations
FrancescoSaverioZuppichini Mar 15, 2022
72a0798
fix tests
FrancescoSaverioZuppichini Mar 15, 2022
9ff078e
minor changes
FrancescoSaverioZuppichini Mar 15, 2022
5a5fc6d
resolved conversations
FrancescoSaverioZuppichini Mar 16, 2022
1d36bb8
attentions one per stage
FrancescoSaverioZuppichini Mar 16, 2022
ce005be
typo
FrancescoSaverioZuppichini Mar 16, 2022
cfb3650
typos
FrancescoSaverioZuppichini Mar 16, 2022
66b2306
typos
FrancescoSaverioZuppichini Mar 16, 2022
120488a
function signature
FrancescoSaverioZuppichini Mar 16, 2022
25e5105
CI
FrancescoSaverioZuppichini Mar 16, 2022
669c1c7
clean up tests
FrancescoSaverioZuppichini Mar 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/model_doc/swin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ The hierarchical design and the shifted window approach also prove beneficial fo

Tips:
- One can use the [`AutoFeatureExtractor`] API to prepare images for the model.
- Swin pads the inputs supporting any input height and width (if divisible by `32`).
- Swin can be used as a *backbone*. When `output_hidden_states = True`, it will output both `hidden_states` and `reshaped_hidden_states`. The `reshaped_hidden_states` have a shape of `(batch, num_channels, height, width)` rather than `(batch_size, sequence_length, num_channels)`.

<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/swin_transformer_architecture.png"
alt="drawing" width="600"/>
Expand Down
Loading