Skip to content

Preserve FP32 coordinates under BF16 in tomography and for INRs - #280

Open
ccasert wants to merge 1 commit into
electronmicroscopy:devfrom
ccasert:fix/tomography-bf16-coordinate-precision
Open

Preserve FP32 coordinates under BF16 in tomography and for INRs#280
ccasert wants to merge 1 commit into
electronmicroscopy:devfrom
ccasert:fix/tomography-bf16-coordinate-precision

Conversation

@ccasert

@ccasert ccasert commented Aug 20, 2026

Copy link
Copy Markdown

What problem this PR addreseses

This PR fixes BF16 instability in INRs by keeping rays and sampler coordinates (for kplanes) in FP32.

Coordinates are normalized to [-1, 1]. At high enough resolution, training INRs with BF16 can cause instability because the spacing between points can become less than BF16 can represent, so adjacent samples can collapse to the same value.

It also applies BF16 consistently during training, validation, and pretraining for tomography; previously reconstruction used BF16 only during validation.

What should the reviewer(s) do

Review the FP32 and BF16 coordinate behavior.

  • This PR introduces a public-facing API change (use_bfloat16).

@cedriclim1
cedriclim1 self-requested a review August 20, 2026 21:02
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