34db6edd43ba14a56c357f7dc30a5057c95e7f13,albumentations/augmentations/functional.py,,normalize,#Any#Any#Any#Any#,84

Before Change


    img = img.astype(np.float32) / max_pixel_value

    img -= np.ones(img.shape) * mean
    img /= np.ones(img.shape) * std
    return img


def cutout(img, num_holes, max_h_size, max_w_size):

After Change


    img = img.astype(np.float32) / max_pixel_value

    img = cv2.subtract(img, np.ones_like(img) * np.asarray(mean, dtype=np.float32))
    img = cv2.divide(img, np.ones_like(img) * np.asarray(std, dtype=np.float32))

    return img

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: albu/albumentations
Commit Name: 34db6edd43ba14a56c357f7dc30a5057c95e7f13
Time: 2018-11-06
Author: marcocaccin@users.noreply.github.com
File Name: albumentations/augmentations/functional.py
Class Name:
Method Name: normalize


Project Name: facebookresearch/Horizon
Commit Name: 9cf8f6cdf6a2008843cb37da6e34b8d10353b0bf
Time: 2019-12-12
Author: kittipat@fb.com
File Name: ml/rl/preprocessing/sparse_to_dense.py
Class Name: PythonSparseToDenseProcessor
Method Name: process


Project Name: enthought/chaco
Commit Name: 4f6aed33e977910f8275ba72aaf373ae6d9e1156
Time: 2009-12-15
Author: warren.weckesser@651a555e-23ca-0310-84fe-ca9f7c59d2ea
File Name: enthought/chaco/color_mapper.py
Class Name: ColorMapper
Method Name: map_screen


Project Name: glm-tools/pyglmnet
Commit Name: b24424be3e59c7d9fb611830f73c46872a743196
Time: 2019-10-19
Author: pavan.ramkumar@gmail.com
File Name: pyglmnet/pyglmnet.py
Class Name: GLM
Method Name: fit