Refine semantic inner-loop early stop#74
Conversation
|
Hi, thanks a lot for the contribution! I think a time adaptive (based on abt) early stop is a very promising direction! Note that there is already a simple early-stop mechanism that simply disables iteration for the last several steps. It would be better to merge them together and keep the number of hyperparameters to a minimum. I have several questions before we merge the early stop mechanism.
Additional note: Personally, I prefer stopping iteration entirely instead of freezing x₀ and continuing to iterate. The intuition is the following:
|
98d5128 to
daeaabe
Compare
|
I added optional per-inner-step tracing (--trace-inner) and on an ImageNet-256 subset=50 run the stop metric usually drops a lot over inner steps (median dist(last)/dist(first) ~0.03-0.16 for outer steps 11-18), but it is not strictly monotonic every step. |
|
I have cleaned the code by adding an early stopper file to the code. |
# Conflicts: # src/LanPaint/lanpaint.py
Moved the early-stop logic from lanpaint.py into a new src/LanPaint/earlystop.py module as the LanPaintEarlyStopper class. This improves code organization and maintainability by encapsulating early-stop behavior, reducing complexity in the main LanPaint class.
Reordered the Coef_C function definition to appear before advance_time for improved code organization and readability.
add138f to
34ded92
Compare
|
I agreed with the concern about tuning surface, so I removed the extra internal knobs (ABT min/max thresholds, patience boosts, threshold floors, and the dilation ring kernel/padding) and kept the user-facing controls to just For backward compatibility, I also mapped the legacy The boundary check has no parameter now(4-neighbor adjacency) and the ABT behavior is derived from |
|
Hi, Thanks a lot for the refactor! I'm checking the code and doing some ablation on LanPaintBench |
Summary
This PR refines LanPaint semantic inner-loop early stop to reduce tuning surface area, addressing feedback in #74 (comment: #74 (comment)).
What changed
Testing
Local:
Fork CI: