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

Download this file

7 lines (7 with data), 780 Bytes

3

 \–aã@s&ddlZddlTddlZddd„ZdS)éNé)Ú*çà?cCsÆ|dk}|tj|ƒk}t|ƒ}t|ƒ}||}tj|dd}tj|dd}||}tj|dd}tj|dd}||}tj|dd}tj|dd}||||d}ddtj|ƒ|jdƒ}|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ú&/home/ws/yanghan/Newcode/losses/IoU.pyÚIoU_losss r)r)rÚutilsÚnumpyÚnprrrrrÚ<module>s