"""PTQ config file."""
from nncf import IgnoredScope
from nncf.common.quantization.structs import QuantizationPreset
from nncf.quantization.advanced_parameters import AdvancedQuantizationParameters
from nncf.quantization.range_estimator import (
    AggregatorType,
    RangeEstimatorParameters,
    StatisticsCollectorParameters,
    StatisticsType,
)

advanced_parameters = AdvancedQuantizationParameters(
    activations_range_estimator_params=RangeEstimatorParameters(
        min=StatisticsCollectorParameters(
            statistics_type=StatisticsType.QUANTILE, aggregator_type=AggregatorType.MIN, quantile_outlier_prob=1e-4
        ),
        max=StatisticsCollectorParameters(
            statistics_type=StatisticsType.QUANTILE, aggregator_type=AggregatorType.MAX, quantile_outlier_prob=1e-4
        ),
    ),
    backend_params={"use_pot": True},
)

preset = QuantizationPreset.PERFORMANCE

ignored_scope = IgnoredScope(
    names=[
        "/backbone/stage0/stage0.0/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage0/stage0.0/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage0/stage0.0/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage0/stage0.0/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage0/stage0.0/Add_1",
        "/backbone/stage0/stage0.1/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage0/stage0.1/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage0/stage0.1/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage0/stage0.1/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage0/stage0.1/Add_1",
        "/backbone/stage1/stage1.0/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage1/stage1.0/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage1/stage1.0/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage1/stage1.0/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage1/stage1.0/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage1/stage1.0/Add_1",
        "/backbone/stage1/stage1.0/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage1/stage1.0/Add_2",
        "/backbone/stage1/stage1.0/Add_5",
        "/backbone/stage1/stage1.1/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage1/stage1.1/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage1/stage1.1/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage1/stage1.1/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage1/stage1.1/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage1/stage1.1/Add_1",
        "/backbone/stage1/stage1.1/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage1/stage1.1/Add_2",
        "/backbone/stage1/stage1.1/Add_5",
        "/backbone/stage1/stage1.2/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage1/stage1.2/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage1/stage1.2/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage1/stage1.2/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage1/stage1.2/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage1/stage1.2/Add_1",
        "/backbone/stage1/stage1.2/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage1/stage1.2/Add_2",
        "/backbone/stage1/stage1.2/Add_5",
        "/backbone/stage1/stage1.3/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage1/stage1.3/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage1/stage1.3/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage1/stage1.3/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage1/stage1.3/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage1/stage1.3/Add_1",
        "/backbone/stage1/stage1.3/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage1/stage1.3/Add_2",
        "/backbone/stage1/stage1.3/Add_5",
        "/backbone/stage2/stage2.0/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage2/stage2.0/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage2/stage2.0/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage2/stage2.0/layers/layers.0/cross_resolution_weighting/Mul_3",
        "/backbone/stage2/stage2.0/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage2/stage2.0/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage2/stage2.0/Add_1",
        "/backbone/stage2/stage2.0/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage2/stage2.0/Add_2",
        "/backbone/stage2/stage2.0/layers/layers.1/cross_resolution_weighting/Mul_3",
        "/backbone/stage2/stage2.0/Add_3",
        "/backbone/stage2/stage2.0/Add_6",
        "/backbone/stage2/stage2.0/Add_7",
        "/backbone/stage2/stage2.0/Add_11",
        "/backbone/stage2/stage2.1/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage2/stage2.1/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage2/stage2.1/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage2/stage2.1/layers/layers.0/cross_resolution_weighting/Mul_3",
        "/backbone/stage2/stage2.1/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage2/stage2.1/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage2/stage2.1/Add_1",
        "/backbone/stage2/stage2.1/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage2/stage2.1/Add_2",
        "/backbone/stage2/stage2.1/layers/layers.1/cross_resolution_weighting/Mul_3",
        "/backbone/stage2/stage2.1/Add_3",
        "/backbone/stage2/stage2.1/Add_6",
        "/backbone/stage2/stage2.1/Add_7",
        "/backbone/stage2/stage2.1/Add_11",
        "/backbone/stage2/stage2.2/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage2/stage2.2/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage2/stage2.2/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage2/stage2.2/layers/layers.0/cross_resolution_weighting/Mul_3",
        "/backbone/stage2/stage2.2/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage2/stage2.2/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage2/stage2.2/Add_1",
        "/backbone/stage2/stage2.2/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage2/stage2.2/Add_2",
        "/backbone/stage2/stage2.2/layers/layers.1/cross_resolution_weighting/Mul_3",
        "/backbone/stage2/stage2.2/Add_3",
        "/backbone/stage2/stage2.2/Add_6",
        "/backbone/stage2/stage2.2/Add_7",
        "/backbone/stage2/stage2.2/Add_11",
        "/backbone/stage2/stage2.3/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage2/stage2.3/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage2/stage2.3/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage2/stage2.3/layers/layers.0/cross_resolution_weighting/Mul_3",
        "/backbone/stage2/stage2.3/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage2/stage2.3/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage2/stage2.3/Add_1",
        "/backbone/stage2/stage2.3/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage2/stage2.3/Add_2",
        "/backbone/stage2/stage2.3/layers/layers.1/cross_resolution_weighting/Mul_3",
        "/backbone/stage2/stage2.3/Add_3",
        "/backbone/stage2/stage2.3/Add_6",
        "/backbone/stage2/stage2.3/Add_7",
        "/backbone/stage2/stage2.3/Add_11",
        "/backbone/stage3/stage3.0/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage3/stage3.0/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage3/stage3.0/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage3/stage3.0/layers/layers.0/cross_resolution_weighting/Mul_3",
        "/backbone/stage3/stage3.0/layers/layers.0/cross_resolution_weighting/Mul_4",
        "/backbone/stage3/stage3.0/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage3/stage3.0/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage3/stage3.0/Add_1",
        "/backbone/stage3/stage3.0/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage3/stage3.0/Add_2",
        "/backbone/stage3/stage3.0/layers/layers.1/cross_resolution_weighting/Mul_3",
        "/backbone/stage3/stage3.0/Add_3",
        "/backbone/stage3/stage3.0/layers/layers.1/cross_resolution_weighting/Mul_4",
        "/backbone/stage3/stage3.0/Add_4",
        "/backbone/stage3/stage3.0/Add_7",
        "/backbone/stage3/stage3.0/Add_8",
        "/backbone/stage3/stage3.0/Add_9",
        "/backbone/stage3/stage3.0/Add_13",
        "/backbone/stage3/stage3.0/Add_14",
        "/backbone/stage3/stage3.0/Add_19",
        "/backbone/stage3/stage3.1/layers/layers.0/cross_resolution_weighting/Mul",
        "/backbone/stage3/stage3.1/layers/layers.0/cross_resolution_weighting/Mul_1",
        "/backbone/stage3/stage3.1/layers/layers.0/cross_resolution_weighting/Mul_2",
        "/backbone/stage3/stage3.1/layers/layers.0/cross_resolution_weighting/Mul_3",
        "/backbone/stage3/stage3.1/layers/layers.0/cross_resolution_weighting/Mul_4",
        "/backbone/stage3/stage3.1/layers/layers.1/cross_resolution_weighting/Mul",
        "/backbone/stage3/stage3.1/layers/layers.1/cross_resolution_weighting/Mul_1",
        "/backbone/stage3/stage3.1/Add_1",
        "/backbone/stage3/stage3.1/layers/layers.1/cross_resolution_weighting/Mul_2",
        "/backbone/stage3/stage3.1/Add_2",
        "/backbone/stage3/stage3.1/layers/layers.1/cross_resolution_weighting/Mul_3",
        "/backbone/stage3/stage3.1/Add_3",
        "/backbone/stage3/stage3.1/layers/layers.1/cross_resolution_weighting/Mul_4",
        "/backbone/stage3/stage3.1/Add_4",
        "/backbone/stage3/stage3.1/Add_7",
        "/backbone/stage3/stage3.1/Add_8",
        "/backbone/stage3/stage3.1/Add_9",
        "/backbone/stage3/stage3.1/Add_13",
        "/backbone/stage3/stage3.1/Add_14",
        "/backbone/stage3/stage3.1/Add_19",
        "/aggregator/Add",
        "/aggregator/Add_1",
        "/aggregator/Add_2",
        "/aggregator/Add_3",
        "/backbone/stage0/stage0.0/Add",
        "/backbone/stage0/stage0.1/Add",
        "/backbone/stage1/stage1.0/Add",
        "/backbone/stage1/stage1.1/Add",
        "/backbone/stage1/stage1.2/Add",
        "/backbone/stage1/stage1.3/Add",
        "/backbone/stage2/stage2.0/Add",
        "/backbone/stage2/stage2.1/Add",
        "/backbone/stage2/stage2.2/Add",
        "/backbone/stage2/stage2.3/Add",
        "/backbone/stage3/stage3.0/Add",
        "/backbone/stage3/stage3.1/Add",
    ]
)
