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.
This PR includes a suite of loss function refactors. Loss functions for training models are pulled out of the
metrics
submodule and into the newloss_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: