Skip to content

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