bd21bb4fec8d10b257ceccc3d302abd6d5b7c7d5,test/augmentation/test_random_generator.py,TestColorJitterGen,test_random_prob_gen_same_on_batch,#TestColorJitterGen#,107

Before Change


    def test_random_prob_gen_same_on_batch(self):
        torch.manual_seed(42)
        batch_size = 8
        jitter_params = random_color_jitter_generator(
            batch_size, brightness=0.2, contrast=0.3, saturation=0.4, hue=0.1, same_on_batch=True)

        expected_res = {
            "brightness_factor": torch.tensor([1.15290772914886474609375] * batch_size),
            "contrast_factor": torch.tensor([1.24900233745574951171875] * batch_size),

After Change


    def test_random_prob_gen_same_on_batch(self):
        torch.manual_seed(42)
        batch_size = 8
        jitter_params = random_color_jitter_generator(
            batch_size, brightness=torch.tensor([0.8, 1.2]), contrast=torch.tensor([0.7, 1.3]),
            saturation=torch.tensor([0.6, 1.4]), hue=torch.tensor([-0.1, 0.1]), same_on_batch=True)

        expected_res = {
            "brightness_factor": torch.tensor([1.15290772914886474609375] * batch_size),
            "contrast_factor": torch.tensor([1.24900233745574951171875] * batch_size),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: arraiy/torchgeometry
Commit Name: bd21bb4fec8d10b257ceccc3d302abd6d5b7c7d5
Time: 2020-08-26
Author: sj8716643@126.com
File Name: test/augmentation/test_random_generator.py
Class Name: TestColorJitterGen
Method Name: test_random_prob_gen_same_on_batch


Project Name: arraiy/torchgeometry
Commit Name: bd21bb4fec8d10b257ceccc3d302abd6d5b7c7d5
Time: 2020-08-26
Author: sj8716643@126.com
File Name: test/augmentation/test_random_generator.py
Class Name: TestColorJitterGen
Method Name: test_random_prob_gen_same_on_batch


Project Name: arraiy/torchgeometry
Commit Name: bd21bb4fec8d10b257ceccc3d302abd6d5b7c7d5
Time: 2020-08-26
Author: sj8716643@126.com
File Name: test/augmentation/test_random_generator.py
Class Name: TestColorJitterGen
Method Name: test_color_jitter_tuple_gen


Project Name: arraiy/torchgeometry
Commit Name: bd21bb4fec8d10b257ceccc3d302abd6d5b7c7d5
Time: 2020-08-26
Author: sj8716643@126.com
File Name: test/augmentation/test_random_generator.py
Class Name: TestColorJitterGen
Method Name: test_color_jitter_gen