Skip to content

Inconsistency Between Paper-Stated Loss Weights and Implemented Loss Scaling #70

Description

@nmahammad

While reviewing the Zero-DCE loss formulation, I identified a significant inconsistency between the loss weights reported in the paper and the effective loss scaling implemented in the official code.

According to the paper, the loss weights are defined as:

Weight_color = 0.5
Weight_total_variation = 20


Actual implementation :

Loss_TV  = 200 * L_TV(A)
loss_col = 5 * mean(L_color(enhanced_image))
loss_exp = 10 * mean(L_exp(enhanced_image))
loss_spa = mean(L_spa(enhanced_image, img_lowlight))

In addition, the TV loss itself contains an internal scaling factor making the weight up too 400:

return 2 * (vertical_tv / count_h + horizontal_tv / count_w) / batch_size

A brief clarification or refactoring the code would help users correctly reuse the model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions