def METHOD_NAME(weight1, weight2, bias1):
    w1 = weight1
    w2 = weight2
    b1 = bias1
    range1 = np.amax(np.abs(w1), axis=(1, 2, 3))
    range2 = np.amax(np.abs(w2), axis=(0, 2, 3))
    scale_factor = range1 / np.power(range1 * range2, 1. / 2)
    for i in range(len(scale_factor)):
        w1[i, :, :, :] = w1[i, :, :, :] * (1.0 / scale_factor[i])
        w2[:, i, :, :] = w2[:, i, :, :] * scale_factor[i]
        b1[i] = b1[i] * (1.0 / scale_factor[i])
    return w1, w2, b1, scale_factor