9520f251808add32cd7c6b36f65fc6e031eaa3ff,nni/algorithms/compression/pytorch/quantization/quantizers.py,,update_quantization_param,#Any#Any#Any#,68

Before Change


    // extend the [min, max] interval to ensure that it contains 0.
    // Otherwise, we would not meet the requirement that 0 be an exactly
    // representable value.
    if rmin.is_cuda:
        rmin = torch.min(rmin, torch.Tensor([0]).cuda())
        rmax = torch.max(rmax, torch.Tensor([0]).cuda())
        qmin = torch.Tensor([0]).cuda()
        qmax = torch.Tensor([(1 << bits) - 1]).cuda()
    else:

After Change


    // extend the [min, max] interval to ensure that it contains 0.
    // Otherwise, we would not meet the requirement that 0 be an exactly
    // representable value.
    rmin = torch.min(rmin, torch.Tensor([0]).to(rmin.device))
    rmax = torch.max(rmax, torch.Tensor([0]).to(rmin.device))
    qmin = torch.Tensor([0]).to(rmin.device)
    qmax = torch.Tensor([(1 << bits) - 1]).to(rmin.device)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: microsoft/nni
Commit Name: 9520f251808add32cd7c6b36f65fc6e031eaa3ff
Time: 2020-12-22
Author: 39682259+eedalong@users.noreply.github.com
File Name: nni/algorithms/compression/pytorch/quantization/quantizers.py
Class Name:
Method Name: update_quantization_param


Project Name: keras-team/autokeras
Commit Name: 5cc55a742a1230dd87d803d4c9127cd945c9db83
Time: 2019-01-07
Author: yashwanth95tuniki@gmail.com
File Name: autokeras/pretrained/face_detector.py
Class Name: MtcnnDetector
Method Name: detect_onet


Project Name: keras-team/autokeras
Commit Name: 5cc55a742a1230dd87d803d4c9127cd945c9db83
Time: 2019-01-07
Author: yashwanth95tuniki@gmail.com
File Name: autokeras/pretrained/face_detector.py
Class Name: MtcnnDetector
Method Name: detect_rnet