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

Hf export #107

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Hf export #107

wants to merge 18 commits into from

Conversation

gheinrich
Copy link
Collaborator

No description provided.

@gheinrich gheinrich marked this pull request as draft December 10, 2024 16:23
@@ -70,6 +70,10 @@ def forward(self, x: torch.Tensor) -> List[torch.Tensor]:
# Standard ViT case.
patch_height, patch_width = self.base_model.model.patch_embed.patch_size
features = features.reshape(B, math.ceil(H/patch_height), math.ceil(W/patch_width), C).permute(0, 3, 1, 2).contiguous()
else:
B, _, C = features.shape
patch_height = patch_width = 16
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? Don't we have a robust property self.base_model.patch_size?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants