8201900250bab24c768542f80090dc6381f05af1,niftynet/layer/loss_segmentation.py,LossFunction,__init__,#LossFunction#Any#Any#Any#Any#,21

Before Change



        super(LossFunction, self).__init__(name=name)
        self._num_classes = n_class
        if loss_func_params is not None:
            self._loss_func_params = loss_func_params
        else:
            self._loss_func_params = {}
        self._data_loss_func = None
        self.make_callable_loss_func(loss_type)

    def make_callable_loss_func(self, type_str):
        self._data_loss_func = LossSegmentationFactory.create(type_str)

After Change


        // set loss function and function-specific additional params.
        self._data_loss_func = LossSegmentationFactory.create(loss_type)
        self._loss_func_params = \
            loss_func_params if loss_func_params is not None else dict()

    def layer_op(self,
                 prediction,
                 ground_truth,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 8

Instances


Project Name: NifTK/NiftyNet
Commit Name: 8201900250bab24c768542f80090dc6381f05af1
Time: 2018-01-26
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name: LossFunction
Method Name: __init__


Project Name: NifTK/NiftyNet
Commit Name: 0cf2ab94a3199517d4cf22cecce57d02295e2ab5
Time: 2018-01-12
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name: LossFunction
Method Name: __init__


Project Name: NifTK/NiftyNet
Commit Name: 0cf2ab94a3199517d4cf22cecce57d02295e2ab5
Time: 2018-01-12
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/loss_regression.py
Class Name: LossFunction
Method Name: __init__


Project Name: NifTK/NiftyNet
Commit Name: 8201900250bab24c768542f80090dc6381f05af1
Time: 2018-01-26
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/layer/loss_regression.py
Class Name: LossFunction
Method Name: __init__