Skip to content

Fix Threshold + AA resulting in wrong broadcasting #2592

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

Merged
merged 2 commits into from
Feb 18, 2024

Conversation

RunDevelopment
Copy link
Member

binary_threshold from chainner_rs returned an image of the shape binary = (h, w, 1) when given a grayscale image of the shape img = (h, w). Multiplying those to image then resulted in an image of the shape (h, w, h) (for some reason) which obviously takes up an insane amount of memory. E.g. an image (4096, 4096, 4096) takes up 256GB of RAM.

The fix is to cast binary to the shape (h, w) if it's 2D anyway.

@joeyballentine joeyballentine merged commit 0f126c4 into chaiNNer-org:main Feb 18, 2024
@RunDevelopment RunDevelopment deleted the threshold-mem-bug branch February 18, 2024 22:21
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