8201900250bab24c768542f80090dc6381f05af1,tests/loss_regression_test.py,RMSELossTests,test_rmse_loss_value_weight,#RMSELossTests#,156

Before Change



    def test_rmse_loss_value_weight(self):
        with self.test_session():
            weights = tf.constant(
                [1, 2.1], dtype=tf.float32, name="weights")
            predicted = tf.constant(
                [1, 1], dtype=tf.float32, name="predicted")
            labels = tf.constant([1, 0], dtype=tf.float32, name="labels")
            test_loss_func = LossFunction(loss_type="RMSE")
            computed_rmse_loss = test_loss_func(predicted, labels, weights)
            self.assertAlmostEqual(
                computed_rmse_loss.eval(), 0.8231, places=4)

After Change



    def test_rmse_loss_value_weight(self):
        with self.test_session():
            weights = tf.constant(
                [[1, 2.1]], dtype=tf.float32, name="weights")
            predicted = tf.constant(
                [[1, 1]], dtype=tf.float32, name="predicted")
            labels = tf.constant([[1, 0]], dtype=tf.float32, name="labels")
            test_loss_func = LossFunction(loss_type="RMSE")
            computed_rmse_loss = test_loss_func(predicted, labels, weights)
            self.assertAlmostEqual(
                computed_rmse_loss.eval(), 0.8231, places=4)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 10

Non-data size: 9

Instances


Project Name: NifTK/NiftyNet
Commit Name: 8201900250bab24c768542f80090dc6381f05af1
Time: 2018-01-26
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: RMSELossTests
Method Name: test_rmse_loss_value_weight


Project Name: NifTK/NiftyNet
Commit Name: 8201900250bab24c768542f80090dc6381f05af1
Time: 2018-01-26
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: L2LossTests
Method Name: test_l2_loss_value_weight


Project Name: NifTK/NiftyNet
Commit Name: 8201900250bab24c768542f80090dc6381f05af1
Time: 2018-01-26
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: MAELossTests
Method Name: test_MAE_loss_value_weight


Project Name: NifTK/NiftyNet
Commit Name: 8201900250bab24c768542f80090dc6381f05af1
Time: 2018-01-26
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: HuberLossTests
Method Name: test_huber_loss_value_weight


Project Name: NifTK/NiftyNet
Commit Name: 0cf2ab94a3199517d4cf22cecce57d02295e2ab5
Time: 2018-01-12
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: L2LossTests
Method Name: test_l2_loss_value_weight


Project Name: NifTK/NiftyNet
Commit Name: 0cf2ab94a3199517d4cf22cecce57d02295e2ab5
Time: 2018-01-12
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: L1LossTests
Method Name: test_l1_loss_value_weight


Project Name: NifTK/NiftyNet
Commit Name: 0cf2ab94a3199517d4cf22cecce57d02295e2ab5
Time: 2018-01-12
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: HuberLossTests
Method Name: test_huber_loss_value_weight


Project Name: NifTK/NiftyNet
Commit Name: 8201900250bab24c768542f80090dc6381f05af1
Time: 2018-01-26
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: L1LossTests
Method Name: test_l1_loss_value_weight


Project Name: NifTK/NiftyNet
Commit Name: 0cf2ab94a3199517d4cf22cecce57d02295e2ab5
Time: 2018-01-12
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: MAELossTests
Method Name: test_MAE_loss_value_weight


Project Name: NifTK/NiftyNet
Commit Name: 0cf2ab94a3199517d4cf22cecce57d02295e2ab5
Time: 2018-01-12
Author: wenqi.li@ucl.ac.uk
File Name: tests/loss_regression_test.py
Class Name: RMSELossTests
Method Name: test_rmse_loss_value_weight