:github_url: https://github.com/Project-MONAI/MONAI

.. _losses:

Loss functions
==============

Segmentation Losses
-------------------

.. automodule:: monai.losses
.. currentmodule:: monai.losses

`DiceLoss`
~~~~~~~~~~
.. autoclass:: DiceLoss
    :members:

.. autoclass:: Dice
    :members:

.. autoclass:: dice
    :members:

`MaskedDiceLoss`
~~~~~~~~~~~~~~~~
.. autoclass:: MaskedDiceLoss
    :members:

`GeneralizedDiceLoss`
~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: GeneralizedDiceLoss
    :members:

.. autoclass:: generalized_dice
    :members:

`GeneralizedWassersteinDiceLoss`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: GeneralizedWassersteinDiceLoss
    :members:

.. autoclass:: generalized_wasserstein_dice
    :members:

`DiceCELoss`
~~~~~~~~~~~~
.. autoclass:: DiceCELoss
    :members:

`DiceFocalLoss`
~~~~~~~~~~~~~~~
.. autoclass:: DiceFocalLoss
    :members:

`GeneralizedDiceFocalLoss`
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: GeneralizedDiceFocalLoss
    :members:

`FocalLoss`
~~~~~~~~~~~
.. autoclass:: FocalLoss
    :members:

`TverskyLoss`
~~~~~~~~~~~~~
.. autoclass:: TverskyLoss
    :members:

`ContrastiveLoss`
~~~~~~~~~~~~~~~~~
.. autoclass:: ContrastiveLoss
    :members:

`BarlowTwinsLoss`
~~~~~~~~~~~~~~~~~
.. autoclass:: BarlowTwinsLoss
    :members:

`HausdorffDTLoss`
~~~~~~~~~~~~~~~~~
.. autoclass:: HausdorffDTLoss
    :members:

`SoftclDiceLoss`
~~~~~~~~~~~~~~~~
.. autoclass:: SoftclDiceLoss
    :members:

`SoftDiceclDiceLoss`
~~~~~~~~~~~~~~~~~~~~
.. autoclass:: SoftDiceclDiceLoss
    :members:

`NACLLoss`
~~~~~~~~~~
.. autoclass:: NACLLoss
    :members:

Registration Losses
-------------------

`BendingEnergyLoss`
~~~~~~~~~~~~~~~~~~~
.. autoclass:: BendingEnergyLoss
    :members:

`DiffusionLoss`
~~~~~~~~~~~~~~~
.. autoclass:: DiffusionLoss
    :members:

`LocalNormalizedCrossCorrelationLoss`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: LocalNormalizedCrossCorrelationLoss
    :members:

`GlobalMutualInformationLoss`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: GlobalMutualInformationLoss
    :members:

Reconstruction Losses
---------------------

`SSIMLoss`
~~~~~~~~~~
.. autoclass:: monai.losses.ssim_loss.SSIMLoss
    :members:

`PatchAdversarialLoss`
~~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: PatchAdversarialLoss
    :members:

`PerceptualLoss`
~~~~~~~~~~~~~~~~~
.. autoclass:: PerceptualLoss
    :members:

`JukeboxLoss`
~~~~~~~~~~~~~~
.. autoclass:: JukeboxLoss
    :members:

`SURELoss`
~~~~~~~~~~
.. autoclass:: SURELoss
    :members:


Loss Wrappers
-------------

`MultiScaleLoss`
~~~~~~~~~~~~~~~~
.. autoclass:: MultiScaleLoss
    :members:

`MaskedLoss`
~~~~~~~~~~~~
.. autoclass:: MaskedLoss
    :members:

`DeepSupervisionLoss`
~~~~~~~~~~~~~~~~~~~~~
.. autoclass:: DeepSupervisionLoss
    :members:
