def METHOD_NAME(self, input, init_scale=1.0, channel_shared=False):
    from paddle.fluid.layer_helper import LayerHelper
    from paddle.fluid.initializer import Constant
    helper = LayerHelper("Scale")
    l2_norm = fluid.layers.l2_normalize(
        input, axis=1)  # l2 norm along channel
    shape = [1] if channel_shared else [input.shape[1]]
    scale = helper.create_parameter(
        attr=helper.param_attr,
        shape=shape,
        dtype=input.dtype,
        default_initializer=Constant(init_scale))
    out = fluid.layers.elementwise_mul(
        x=l2_norm, y=scale, axis=-1 if channel_shared else 1,
        name="conv4_3_norm_scale")
    return out