executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
haar_high_frequency_enhancementExtract Haar high-frequency components and compute DDPM-PA high-frequency preservation and detail losses.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this skill when implementing the DDPM-PA high-frequency branch. It decomposes images with a Haar transform, forms the paper's high-frequency representation LH + HL + HH, computes high-frequency pairwise preservation, and computes high-frequency MSE against target training images.
Do not substitute ordinary pixel MSE for this module. DDPM-PA separates image-level relative-distance preservation from high-frequency detail preservation.
[batch, channels, height, width] with even height and width.Lhf: pairwise KL preservation loss over high-frequency components.Lhfmse: mean squared error between adapted and target high-frequency components.hf = LH + HL + HH for each block/channel/sample.Run:
python scripts/haar_hf.py --smoke
python -m pytest tests
Tests confirm constant images have zero high-frequency response, checkerboards have positive response, and losses are finite.
This portable script implements a one-level Haar transform for small recovery tensors. Full training code may use framework convolutions, but should preserve the same component definitions and loss separation.