Refactor loss structure (WIP)#305
Draft
sgreenbury wants to merge 4 commits intomainfrom
Draft
Conversation
Split loss into ambient and latent parts so that they can be composed more easily.
Adds a latent_noise_injector parameter to EncoderProcessorDecoder that applies noise in latent space (after encoding) rather than ambient space. This mirrors the existing pattern in ProcessorModel and enables latent regularization independently of ambient data augmentation. - Add _apply_latent_noise method and wire into forward() and _latent_loss() - Update ensemble _latent_loss to also apply latent noise - Refactor _resolve_input_noise_injector into generic _resolve_noise_injector - Add latent_noise_injector config group and model config default - Add tests for additive, concatenated, and None latent noise injection
Adds a Lightning Callback that dynamically adjusts ambient_loss_weight and latent_loss_weight during training based on configurable schedules. Enables curriculum learning patterns like training diffusion models primarily with latent loss then gradually ramping in ambient loss. - LossWeightScheduleCallback with step-based and epoch-based progress - Built-in schedules: LinearRampSchedule, CosineSchedule, ConstantSchedule - Handles encoder/decoder unfreezing when ambient weight becomes positive - Checkpoint state_dict support for resume - Comprehensive tests for schedules and callback behavior
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.
No description provided.