Skip to content

Make normalization stable when target_dtype is float16#2941

Merged
FabianIsensee merged 1 commit intoMIC-DKFZ:masterfrom
nucli-vicky:stable-fp16-normalization
Mar 13, 2026
Merged

Make normalization stable when target_dtype is float16#2941
FabianIsensee merged 1 commit intoMIC-DKFZ:masterfrom
nucli-vicky:stable-fp16-normalization

Conversation

@nucli-vicky
Copy link
Contributor

1e-8 may be unstable when working float16.
From the code it seems like the target_dtype will always be fp32 (target_dtype is never explicitly passed so always is the default), but this proposed change makes things robust for future changes or if users end up using a normalization scheme with target_dtype float16.

@FabianIsensee FabianIsensee self-assigned this Nov 12, 2025
@FabianIsensee
Copy link
Member

Thanks!

@FabianIsensee FabianIsensee merged commit 0c32825 into MIC-DKFZ:master Mar 13, 2026
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