Fix latent bugs in tomography optimizer wiring, constraints, and radon#239
Merged
Conversation
step_optimizers and zero_grad_all looped over optimizer_params and stepped both the object and pose optimizers on every pass, so with pose optimization enabled each optimizer took two Adam steps per batch. Gate by key, matching step_schedulers. Also: - pass num_iter to set_schedulers on the reset_dset path so cosine/linear/ exponential schedulers get a valid T_max - scheduler_params setter no longer mutates the caller's dict - drop the non-existent tv_plane key from ObjINRConstraints.soft_constraint_keys (it crashed Constraints.__str__) - ObjectPixelated.get_tv_loss now takes TV over the trailing spatial dims, so it handles a 3D volume, obj_view's [1, D, H, W], and a multimodal [C, D, H, W] - remove an unreachable duplicate branch in TomographyINRDataset.forward - align iradon_torch's default theta with radon_torch / scikit-image (endpoint excluded) Add regression tests covering each fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem this PR addreseses
step_optimizers and zero_grad_all looped over optimizer_params and stepped both the object and pose optimizers on every pass, so with pose optimization enabled each optimizer took two Adam steps per batch. Gate by key, matching step_schedulers.
Also:
Add regression tests covering each fix.
What Reviewer Should Do
Nothing - all tests pass checking for these fixes.