Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Conversation

@mmuckley
Copy link
Contributor

This PR includes a suite of loss function refactors. Loss functions for training models are pulled out of the metrics submodule and into the new loss_fn submodule. This provides a more clear delineation of intended purpose. It also allows separate implementations, which is useful for LPIPS, where we need divide-by-0 protection for the loss, but not for the metric.

Tests are included for all metrics. The normalized LPIPS loss is tested implicitly with the MSE-LPIPS loss.

Losses include:

  • Non-saturating GAN loss
  • OASIS losses
  • MSE loss
  • MSE-LPIPS loss

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 23, 2023
@mmuckley mmuckley force-pushed the mmuckley/div2k_openimages branch from 10263c8 to c9adf58 Compare June 23, 2023 15:48
@mmuckley mmuckley force-pushed the mmuckley/loss_fns branch from 3578b0d to 4c584a1 Compare June 23, 2023 15:49
@mmuckley mmuckley requested a review from marksibrahim July 7, 2023 14:27
@mmuckley mmuckley force-pushed the mmuckley/div2k_openimages branch from c9adf58 to ee2efc6 Compare July 12, 2023 22:34
@mmuckley mmuckley force-pushed the mmuckley/loss_fns branch from 4c584a1 to ac9fa1a Compare July 12, 2023 22:37
Base automatically changed from mmuckley/div2k_openimages to main July 14, 2023 23:42
@mmuckley mmuckley requested a review from lauragustafson July 18, 2023 21:36
@mmuckley mmuckley force-pushed the mmuckley/loss_fns branch from ac9fa1a to c860050 Compare July 28, 2023 19:45
@mmuckley mmuckley merged commit 4e4dfe6 into main Jul 28, 2023
@mmuckley mmuckley deleted the mmuckley/loss_fns branch July 28, 2023 19:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants