Skip to content

feat(training): add gradual frequency-loss transition - #39

Merged
Haruko386 merged 1 commit into
mainfrom
dev
Sep 21, 2026
Merged

Haruko386 merged 1 commit into
mainfrom
dev

Conversation

@Haruko386

Copy link
Copy Markdown
Owner

Summary

Stage 2 previously changed directly from latent MSE + pixel L1 reconstruction to latent frequency loss after iteration 20,000. Add a boolean latent_freq_loss.gradual_transition setting so this transition can be linear instead of abrupt.

With the setting enabled in config/train_apdepth.yaml, the reconstruction weight decreases from 1 to 0 while the frequency-loss weight increases from 0 to 1 between iteration 20,000 and max_iter. Setting it to false, or omitting it in an older saved config, preserves the original hard switch. TensorBoard now records train/freq_loss_weight.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • CI / build change
  • Other

Test Results

  • Verified disabled mode preserves the exact 20,000/20,001 hard-switch boundary.
  • Verified enabled weights at iterations 20,000/20,250/20,500/20,750/21,000 are 0/0.25/0.5/0.75/1.
  • Verified blended loss is finite and backpropagates finite gradients.
  • Parsed all YAML files and ran Python compile checks.
  • ruff check . --select E9,F63,F7,F82 and git diff --check passed.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: dbe92f4e-6323-44bd-b668-8497504c1d2b

📥 Commits

Reviewing files that changed from the base of the PR and between 866708d and 1dae11e.

📒 Files selected for processing (3)
  • README.md
  • config/train_apdepth.yaml
  • src/trainer/apdepth_trainer.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Haruko386 Haruko386 self-assigned this Sep 21, 2026
@Haruko386 Haruko386 added ✨ enhancement New feature for better experience 💫 feature New feature labels Sep 21, 2026
@Haruko386 Haruko386 added this to the ApDepth V2-1 milestone Sep 21, 2026
@Haruko386
Haruko386 merged commit afc81e4 into main Sep 21, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in @ApDepth V2-1 Sep 21, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Sep 23, 2026
1 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ enhancement New feature for better experience 💫 feature New feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant