Skip to content

Commit

Permalink
skip the first instead of the last remaining dims
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaenzig committed Oct 9, 2024
1 parent 4f1cbc7 commit 6d3d049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eva/core/models/transforms/extract_patch_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __call__(
height = width = int(math.sqrt(patch_grid))
if height * width != patch_grid:
if self._ignore_remaining_dims:
features = features[:, :, : height * width]
features = features[:, :, -height * width :]
else:
raise ValueError(f"Patch grid size must be a square number {patch_grid}.")
patch_embeddings = features.view(batch_size, hidden_size, height, width)
Expand Down

0 comments on commit 6d3d049

Please sign in to comment.