Skip to content

fix: NaN assertion uses .all() instead of .any()#908

Open
Mr-Neutr0n wants to merge 1 commit intoCompVis:mainfrom
Mr-Neutr0n:fix/nan-assertion-any-vs-all
Open

fix: NaN assertion uses .all() instead of .any()#908
Mr-Neutr0n wants to merge 1 commit intoCompVis:mainfrom
Mr-Neutr0n:fix/nan-assertion-any-vs-all

Conversation

@Mr-Neutr0n
Copy link

Bug

The NaN assertion assert not torch.isnan(x).all() only triggers when ALL values are NaN. The intended check is to catch ANY NaN values, which requires .any().

Fix

Changed .all() to .any() so the assertion catches any NaN values.

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