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

Bug fix: calculating the right amount of padding to add to image #14

Merged
merged 4 commits into from
Sep 30, 2024

Conversation

mese79
Copy link
Collaborator

@mese79 mese79 commented Sep 26, 2024

There was a bug with the padding calculation and the number of patches per image.
I'm using pytorch unfold function for creating patches, so the padding should be compatible with this function:
pad amount should be enough to make the (final size - patch_size) / stride an integer number.
see torch.nn.Unfold.

@mese79 mese79 merged commit 10093a9 into main Sep 30, 2024
1 of 4 checks passed
@mese79 mese79 deleted the ms/fix/padding branch October 7, 2024 17:24
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.

None yet

2 participants