32ab09487234c61244b2d11fd0bf0a13a96969d1,tests/test_pm_imagenet.py,,equal,#,17

Before Change




def equal(x,y):
    return torch.le(torch.dist(x, y), 1e-6)

@pytest.mark.parametrize("model_name, pretrained", pm_args)
def test_pm_imagenet(model_name, pretrained):
    print("test_pm_imagenet("{}")".format(model_name))

After Change




def equal(x,y):
    return torch.all(torch.lt(torch.abs(torch.add(x, -y)), 1e-12))

@pytest.mark.parametrize("model_name, pretrained", pm_args)
def test_pm_imagenet(model_name, pretrained):
    print("test_pm_imagenet("{}")".format(model_name))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Cadene/pretrained-models.pytorch
Commit Name: 32ab09487234c61244b2d11fd0bf0a13a96969d1
Time: 2018-12-13
Author: remi.cadene@icloud.com
File Name: tests/test_pm_imagenet.py
Class Name:
Method Name: equal


Project Name: interactiveaudiolab/nussl
Commit Name: 9d9ef625dccb7ba0ed3295f18d90de9d6dd59469
Time: 2017-04-04
Author: ethanmanilow@gmail.com
File Name: nussl/audio_signal.py
Class Name: AudioSignal
Method Name: __add__


Project Name: akanimax/pro_gan_pytorch
Commit Name: dbd0e39204953df048ea90992a90a07caefa025f
Time: 2018-11-27
Author: akanimax@gmail.com
File Name: pro_gan_pytorch/CustomLayers.py
Class Name: PixelwiseNorm
Method Name: forward