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

Change automatic upsample to interpolate to match skimage preprocessing #161

Merged
merged 6 commits into from
Jan 3, 2025

Conversation

ieee8023
Copy link
Member

@ieee8023 ieee8023 commented Jan 3, 2025

nn.Upsample was not matching the skimage resizing that was used during training. Changing the function over to torch.nn.functional.interpolate so it matches.

This issue only occurred when an image was passed into a model without being resized to match the model size, and automatic resizing would be performed.

Also now verify the size is a square before resizing in case an incorrect shape is passed in.

@ieee8023 ieee8023 merged commit 09bafae into master Jan 3, 2025
3 checks passed
@ieee8023 ieee8023 deleted the interpolate-fix branch January 3, 2025 01:58
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.

1 participant