Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Wrong code! #1

@Guocode

Description

@Guocode
num = torch.sum(torch.mul(predict, target)) + self.smooth
den = torch.sum(predict.pow(self.p) + target.pow(self.p)) + self.smooth

The add of smooth is done on every index! It should be like this

self.smooth = 1
...
num = torch.sum(torch.mul(predict, target)) + self.smooth
den = torch.sum(predict.pow(self.p) + target.pow(self.p)) + self.smooth
...
return 1 - num/den

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