2b32895c3178a412a701aba09dbad821d8acbd1a,test/color/test_hls.py,TestRgbToHls,test_rgb_to_hls,#TestRgbToHls#Any#,19

Before Change


        data = torch.rand(3, 5, 5).to(device)

        // OpenCV
        data_cv = data.cpu().detach().numpy().transpose(1, 2, 0)
        expected = cv2.cvtColor(data_cv, cv2.COLOR_RGB2HLS)
        expected = torch.from_numpy(expected).to(device)

After Change


        expected[0] = 2 * math.pi * expected[0] / 360.

        f = kornia.color.RgbToHls()
        assert_allclose(f(data), expected)

    def test_batch_rgb_to_hls(self, device):

        data = torch.rand(3, 5, 5).to(device)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: arraiy/torchgeometry
Commit Name: 2b32895c3178a412a701aba09dbad821d8acbd1a
Time: 2019-11-19
Author: edgar.riba@gmail.com
File Name: test/color/test_hls.py
Class Name: TestRgbToHls
Method Name: test_rgb_to_hls


Project Name: lanpa/tensorboardX
Commit Name: 92e275004b35b21633107d6f34a4dcccbc5c9fce
Time: 2017-09-04
Author: huang.dexter@gmail.com
File Name: tensorboardX/summary.py
Class Name:
Method Name: image


Project Name: allenai/allennlp
Commit Name: b0d0d942197d9959eeb9bec6018d0db25b5772d4
Time: 2018-05-31
Author: joelgrus@gmail.com
File Name: allennlp/tests/data/fields/label_field_test.py
Class Name: TestLabelField
Method Name: test_as_tensor_returns_integer_tensor


Project Name: open-mmlab/mmdetection
Commit Name: 427c890279004ecf6923e886baccf464af139945
Time: 2018-09-25
Author: pjmzju@gmail.com
File Name: mmdet/models/detectors/two_stage.py
Class Name: TwoStageDetector
Method Name: simple_test


Project Name: allenai/allennlp
Commit Name: b0d0d942197d9959eeb9bec6018d0db25b5772d4
Time: 2018-05-31
Author: joelgrus@gmail.com
File Name: allennlp/tests/data/fields/label_field_test.py
Class Name: TestLabelField
Method Name: test_label_field_can_index_with_vocab