def METHOD_NAME(params):
    """Generator function for RPN head architecture."""
    head_params = params.rpn_head
    anchors_per_location = params.anchor.num_scales * len(params.anchor.aspect_ratios)
    return heads.RpnHead(
        params.model_params.architecture.min_level,
        params.model_params.architecture.max_level,
        anchors_per_location,
        head_params.num_convs,
        head_params.num_filters,
        head_params.use_separable_conv,
        params.model_params.norm_activation.activation,
        head_params.use_batch_norm,
        norm_activation=norm_activation_generator(params.model_params.norm_activation),
    )