Skip to content

Commit

Permalink
Make Swin and Swinv2 untouched
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels Rogge authored and Niels Rogge committed Aug 8, 2022
1 parent 9cbb1b8 commit 2a30ae5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/transformers/models/swin/modeling_swin.py
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,7 @@ def forward(
)

sequence_output = encoder_outputs[0]
if self.layernorm is not None:
sequence_output = self.layernorm(sequence_output)
sequence_output = self.layernorm(sequence_output)

pooled_output = None
if self.pooler is not None:
Expand Down
3 changes: 1 addition & 2 deletions src/transformers/models/swinv2/modeling_swinv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,8 +1065,7 @@ def forward(
)

sequence_output = encoder_outputs[0]
if self.layernorm is not None:
sequence_output = self.layernorm(sequence_output)
sequence_output = self.layernorm(sequence_output)

pooled_output = None
if self.pooler is not None:
Expand Down

0 comments on commit 2a30ae5

Please sign in to comment.