Skip to content

Charbonnier Loss function possible mistake #130

@kowasaur

Description

@kowasaur

I think that Charbonnier Loss is usually definied as sqrt(x**2 + eps**2) such as on on this page.

However, I noticed that the implementation of Charbonnier Loss in basicsr/losses/losses.py is defined as

@weighted_loss
def charbonnier_loss(pred, target, eps=1e-12):
    return torch.sqrt((pred - target)**2 + eps)

where eps is not squared.

I think this could possibly be a mistake.

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