Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix segformer reshape last stage #15748

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Fix quality
  • Loading branch information
Niels Rogge authored and Niels Rogge committed Feb 25, 2022
commit 982ba0b38b928db6eeab2c15cde990a0dbb63ae4
4 changes: 1 addition & 3 deletions tests/segformer/test_modeling_segformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def prepare_config_and_inputs(self):
semantic_labels = ids_tensor([self.batch_size, self.image_size, self.image_size], self.num_labels)

config = self.get_config()
return config, pixel_values, labels
return config, pixel_values, labels, semantic_labels

def get_config(self):
return SegformerConfig(
Expand All @@ -119,8 +119,6 @@ def get_config(self):
initializer_range=self.initializer_range,
)

return config, pixel_values, labels, semantic_labels

def create_and_check_model(self, config, pixel_values, labels, semantic_labels):
model = SegformerModel(config=config)
model.to(torch_device)
Expand Down