Skip to content

Fix uninformative val_loss - #60

Merged
themattinthehatt merged 2 commits into
paninski-lab:mainfrom
NoahHayes17:fix-val-background
Aug 6, 2026
Merged

Fix uninformative val_loss #60
themattinthehatt merged 2 commits into
paninski-lab:mainfrom
NoahHayes17:fix-val-background

Conversation

@NoahHayes17

Copy link
Copy Markdown
Contributor

Fixes #59

At validation, _sample_background returns None. The renderer turns None into a white background while _prepare_target composites the target on black, so the unmasked perceptual term sees a whole-frame background mismatch and val_loss is inflated to a near-constant value.

Fixed by returning a fixed black background at eval so the render and the composited target share it. Training (random_background) is unchanged.

…nd at validation

At validation, _sample_background returns None. The renderer turns None into a white background while _prepare_target composites the target on black, so the unmasked perceptual term sees a whole-frame background mismatch and val_loss is inflated to a near-constant value. Return a fixed black background at eval so the render and the composited target share it. Training (random_background) is unchanged.
@themattinthehatt
themattinthehatt merged commit c4c84e2 into paninski-lab:main Aug 6, 2026
2 checks passed
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.

Validation loss is uninformative

2 participants