def norm_image(img):
    ' normalize image input '
    img = img.astype(np.float32)
    var = np.var(img, axis=(0, 1), keepdims=True)
    mean = np.mean(img, axis=(0, 1), keepdims=True)
    return ((img - mean) / (np.sqrt(var) + 1e-07))
normalize image input
def norm_image(img):
    '  '
    img = img.astype(np.float32)
    var = np.var(img, axis=(0, 1), keepdims=True)
    mean = np.mean(img, axis=(0, 1), keepdims=True)
    return ((img - mean) / (np.sqrt(var) + 1e-07))