[cf6a9e]: / loss / __pycache__ / IoU.cpython-37.pyc

Download this file

7 lines (7 with data), 795 Bytes

B

`Éaã@s&ddlZddlTddlZddd„ZdS)éNé)Ú*çà?cCsÆ|dk}|t |¡k}t|ƒ}t|ƒ}||}tj|dd}tj|dd}||}tj|dd}tj|dd}||}tj|dd}tj|dd}||||d}ddt |¡| d¡}|S)zw
    2d dice loss
    :param input: predict tensor
    :param target: target tensor
    :return: scalar loss value
    gà?é)Údimgíµ ÷ư>rr)ÚtorchÚmaxÚto_float_and_cudaÚsumÚsize)ÚinputÚtargetÚ	thresholdÚnumÚden1Úden2ÚiouZ	iou_total©rú1/home/wangqiuli/Code/Newcode1222_monk/loss/IoU.pyÚIoU_losss r)r)rÚutilsÚnumpyÚnprrrrrÚ<module>s