b9b14bef590141c201b5aad74147e82b0fb18903,utils/torch_utils.py,,scale_img,#Any#Any#Any#,118

Before Change


    h, w = img.shape[2:]
    s = (int(h * ratio), int(w * ratio))  // new size
    img = F.interpolate(img, size=s, mode="bilinear", align_corners=False)  // resize
    p = h - s[0], w - s[1]
    if not same_shape:  // pad/crop img
        p = [int(math.fmod(x, 64)) for x in p]  // pad to 64 grid size
    return F.pad(img, [0, p[1], 0, p[0]], value=0.447)  // value = imagenet mean

After Change


    img = F.interpolate(img, size=s, mode="bilinear", align_corners=False)  // resize
    if not same_shape:  // pad/crop img
        gs = 64  // (pixels) grid size
        h, w = [math.ceil(x * ratio / gs) * gs for x in (h, w)]
    return F.pad(img, [0, w - s[1], 0, h - s[0]], value=0.447)  // value = imagenet mean

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: ultralytics/yolov3
Commit Name: b9b14bef590141c201b5aad74147e82b0fb18903
Time: 2020-04-07
Author: glenn.jocher@ultralytics.com
File Name: utils/torch_utils.py
Class Name:
Method Name: scale_img


Project Name: jsalt18-sentence-repl/jiant
Commit Name: 774f108378a3403349cdbbbecad52a7ea77b037c
Time: 2020-06-22
Author: email@jasonphang.com
File Name: jiant/proj/main/scripts/configurator.py
Class Name: SimpleAPIMultiTaskConfigurator
Method Name: create_config


Project Name: senarvi/theanolm
Commit Name: b73fc0c21ea55c7d3357fbf633944e1e67db8bdf
Time: 2016-07-31
Author: seppo.git@marjaniemi.com
File Name: theanolm/scoring/latticedecoder.py
Class Name: LatticeDecoder
Method Name: decode


Project Name: iskandr/fancyimpute
Commit Name: ea80e4bf2033628822e2b0f92e2e373d1b3c147b
Time: 2015-12-31
Author: alex.rubinsteyn@gmail.com
File Name: fancyimpute/auto_encoder.py
Class Name:
Method Name: make_network