6f405851fcb3be013441810be9a7edbbc04fd2a3,niftynet/layer/loss_segmentation.py,LossFunction,layer_op,#LossFunction#Any#Any#Any#,46

Before Change


                    if weight_map is not None:
                        weight_b = tf.reshape(weight_map[b_ind], ref_shape)
                        if weight_b.get_shape().as_list()[-1] == 1:
                            weight_b = tf.squeeze(weight_b, axis=-1)
                    else:
                        weight_b = None

                    // preparing loss function parameters

After Change



                    pred_b = tf.reshape(pred_b, [-1, self._num_classes])
                    if self._softmax:
                        pred_b = tf.nn.softmax(
                            tf.cast(pred_b, dtype=tf.float32))
                    ground_truth_b = ground_truth[b_ind]
                    weight_b = None if weight_map is None else weight_map[b_ind]

                    loss_params = {
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: NifTK/NiftyNet
Commit Name: 6f405851fcb3be013441810be9a7edbbc04fd2a3
Time: 2018-05-15
Author: d.shakir@ucl.ac.uk
File Name: niftynet/layer/loss_segmentation.py
Class Name: LossFunction
Method Name: layer_op


Project Name: ixaxaar/pytorch-dnc
Commit Name: a6667bf98c59a7447a6bc55869459e83f5bdb603
Time: 2017-12-07
Author: root@ixaxaar.in
File Name: dnc/sparse_memory.py
Class Name: SparseMemory
Method Name: read_from_sparse_memory


Project Name: minerva-ml/open-solution-data-science-bowl-2018
Commit Name: 4b9c2eb50e7d177bde4836243c7140822b53133d
Time: 2018-06-27
Author: taras.piotr@gmail.com
File Name: src/models.py
Class Name: PyTorchUNet
Method Name: transform