+
    åûjž  ã                  ó:  € R t ^ RIHt ^RIHtHt ^RIHtHt ^RI	H
t
Ht ^RIHtHt ^RIHtHt ^RIHtHtHtHt ^RIHtHt ^R	IHtHt ^R
IHtHt ^RI H!t!H"t" ^RI#H$t$ ^RI%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/H0t0H1t1H2t2 ^RI3H3t3 ^RI4H5t5H6t6 ^RI7H8t8H9t9 ^RI:H;t;H<t< ^RI=H>t>H=t= ^RI?H@t@HAtA ^RIBHCtCHDtD . RNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENtERF# )Ga
  Score images, segmentations and distributions, or register images by mutual information.

A loss with a target takes the prediction first. Where a loss has a ``reduction``, its default and its output
shape differ between families: :ref:`Losses and metrics <losses-metrics-conventions>` tabulates them. The segmentation
losses take logits, the Hausdorff losses probabilities, and the mutual-information losses intensities of any range.

Which function to use, with the module form after the function:

- Image reconstruction: structural dissimilarity of two images, :func:`ssim_loss`, :class:`SSIMLoss`; of two volumes,
  :func:`ssim3d_loss`, :class:`SSIM3DLoss`; over several scales plus an L1 term, :class:`MS_SSIMLoss`; the negative
  PSNR, :func:`psnr_loss`, :class:`PSNRLoss`.
- Smoothness of one image or depth map: :func:`total_variation`, :class:`TotalVariation`; edge-aware smoothness of an
  inverse depth map, :func:`inverse_depth_smoothness_loss`, :class:`InverseDepthSmoothnessLoss`.
- Robust regression on tensors of any shape: linear for large residuals, :func:`charbonnier_loss`,
  :class:`CharbonnierLoss`; logarithmic, :func:`cauchy_loss`, :class:`CauchyLoss`; saturating at 2,
  :func:`geman_mcclure_loss`, :class:`GemanMcclureLoss`; saturating at 1, :func:`welsch_loss`, :class:`WelschLoss`.
- Segmentation by class overlap: the Dice overlap, :func:`dice_loss`, :class:`DiceLoss`; the Tversky index with its
  own false-positive and false-negative weights, :func:`tversky_loss`, :class:`TverskyLoss`; the IoU of one
  foreground, :func:`lovasz_hinge_loss`, :class:`LovaszHingeLoss`; the IoU of every class,
  :func:`lovasz_softmax_loss`, :class:`LovaszSoftmaxLoss`.
- Segmentation by per-pixel cross entropy that down-weights easy pixels: over exclusive classes, :func:`focal_loss`,
  :class:`FocalLoss`; over independent binary outputs, :func:`binary_focal_loss_with_logits`,
  :class:`BinaryFocalLossWithLogits`.
- One-hot encoding of a class-index map: :func:`one_hot`.
- Divergence between probability heatmaps: :func:`kl_div_loss_2d`, :func:`js_div_loss_2d`.
- Segmentation boundary distance: :class:`HausdorffERLoss`; of volumes, :class:`HausdorffERLoss3D`.
- Registration by mutual information: of flat signals, :func:`mutual_information_loss`, :class:`MILossFromRef`; of
  images, :func:`mutual_information_loss_2d`, :class:`MILossFromRef2D`; of volumes,
  :func:`mutual_information_loss_3d`, :class:`MILossFromRef3D`.
- Registration by normalized mutual information: of flat signals, :func:`normalized_mutual_information_loss`,
  :class:`NMILossFromRef`; of images, :func:`normalized_mutual_information_loss_2d`, :class:`NMILossFromRef2D`; of
  volumes, :func:`normalized_mutual_information_loss_3d`, :class:`NMILossFromRef3D`.
- The histogram kernel of the registration losses: :class:`MIKernel`.
)Úannotations)Ú
CauchyLossÚcauchy_loss)ÚCharbonnierLossÚcharbonnier_loss)ÚInverseDepthSmoothnessLossÚinverse_depth_smoothness_loss)ÚDiceLossÚ	dice_loss)Újs_div_loss_2dÚkl_div_loss_2d)ÚBinaryFocalLossWithLogitsÚ	FocalLossÚbinary_focal_loss_with_logitsÚ
focal_loss)ÚGemanMcclureLossÚgeman_mcclure_loss)ÚHausdorffERLossÚHausdorffERLoss3D)ÚLovaszHingeLossÚlovasz_hinge_loss)ÚLovaszSoftmaxLossÚlovasz_softmax_loss)ÚMS_SSIMLoss)ÚMIKernelÚMILossFromRefÚMILossFromRef2DÚMILossFromRef3DÚNMILossFromRefÚNMILossFromRef2DÚNMILossFromRef3DÚmutual_information_lossÚmutual_information_loss_2dÚmutual_information_loss_3dÚ"normalized_mutual_information_lossÚ%normalized_mutual_information_loss_2dÚ%normalized_mutual_information_loss_3d)Úone_hot)ÚPSNRLossÚ	psnr_loss)ÚSSIMLossÚ	ssim_loss)Ú
SSIM3DLossÚssim3d_loss)ÚTotalVariationÚtotal_variation)ÚTverskyLossÚtversky_loss)Ú
WelschLossÚwelsch_lossr   r   r   r	   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r(   r,   r*   r.   r0   r2   r   r   r   r
   r   r   r   r   r   r   r   r!   r"   r#   r$   r%   r&   r'   r)   r-   r+   r/   r1   r3   N)FÚ__doc__Ú
__future__r   Úcauchyr   r   Úcharbonnierr   r   Údepth_smoothr   r   Údicer	   r
   Ú
divergencer   r   Úfocalr   r   r   r   Úgeman_mcclurer   r   Ú	hausdorffr   r   Úlovasz_hinger   r   Úlovasz_softmaxr   r   Úms_ssimr   Úmutual_informationr   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   Úpsnrr(   r)   Ússimr*   r+   Ússim3dr,   r-   r/   r.   Útverskyr0   r1   Úwelschr2   r3   Ú__all__© ó    ÚRC:\Ai_Coding\apps\studio\ComfyUI\.venv\Lib\site-packages\kornia\losses\__init__.pyÚ<module>rK      sp  ðñ$!õF #ç +ß :ß Sß %ß 6ß bÓ bß ?ß 9ß <ß BÝ  ÷÷ ÷ õ õ ß %ß %ß +ß <ß .ß +ð2Øð2àð2ð ð2ð ð	2ð
 ð2ð ð2ð ð2ð ð2ð !ð2ð ð2ð ð2ð ð2ð ð2ð ð2ð ð2ð  ð!2ð" ð#2ð$ ð%2ð& ð'2ð( ð)2ð* ð+2ð, ð-2ð. ð/2ð0 ð12ð2 ð32ð4 $ð52ð6 ð72ð8 ð92ð: ð;2ð< ð=2ð> ð?2ð@ $ðA2ðB ðC2ðD ðE2ðF ðG2ðH ðI2ðJ ðK2ðL !ðM2ðN !ðO2ðP )ðQ2ðR ,ðS2ðT ,ðU2ðV ðW2ðX ðY2ðZ ð[2ð\ ð]2ð^ ð_2ð` ða2ðb ðc2‚rI   