7c6222aeba4ffacf9733df0633cc6f111ee4a6bf,niftynet/layer/loss_segmentation.py,,dice,#Any#Any#Any#,333

Before Change


    :return: the loss
    
    prediction = tf.cast(prediction, tf.float32)
    one_hot = labels_to_one_hot(ground_truth, tf.shape(prediction))

    if weight_map is not None:
        n_classes = prediction.shape[1].value

After Change


    :return: the loss
    
    prediction = tf.cast(prediction, tf.float32)
    one_hot = labels_to_one_hot(ground_truth, tf.shape(prediction)[-1])

    if weight_map is not None:
        n_classes = prediction.shape[1].value
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: NifTK/NiftyNet
Commit Name: 7c6222aeba4ffacf9733df0633cc6f111ee4a6bf
Time: 2018-04-06
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name:
Method Name: dice


Project Name: NifTK/NiftyNet
Commit Name: 7c6222aeba4ffacf9733df0633cc6f111ee4a6bf
Time: 2018-04-06
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name:
Method Name: generalised_dice_loss


Project Name: NifTK/NiftyNet
Commit Name: 7c6222aeba4ffacf9733df0633cc6f111ee4a6bf
Time: 2018-04-06
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name:
Method Name: dice_nosquare


Project Name: NifTK/NiftyNet
Commit Name: 7c6222aeba4ffacf9733df0633cc6f111ee4a6bf
Time: 2018-04-06
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name:
Method Name: generalised_wasserstein_dice_loss


Project Name: NifTK/NiftyNet
Commit Name: 7c6222aeba4ffacf9733df0633cc6f111ee4a6bf
Time: 2018-04-06
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name:
Method Name: sensitivity_specificity_loss