__init__.py 1.6 KB
Newer Older
1 2
"""Quantization Module"""
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
3 4 5 6 7 8 9 10 11 12 13 14 15
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

16
from .imperative.ptq_config import (
17 18 19
    PTQConfig,
    default_ptq_config,
)
20
from .imperative.ptq_quantizer import (
21 22
    BaseQuantizer,
)
23
from .imperative.ptq_quantizer import (
24 25
    AbsmaxQuantizer,
)
26
from .imperative.ptq_quantizer import (
27 28
    PerChannelAbsmaxQuantizer,
)
29
from .imperative.ptq_quantizer import (
30 31
    KLQuantizer,
)
32
from .imperative.ptq_quantizer import (
33 34
    HistQuantizer,
)
35
from .imperative.ptq_quantizer import (
36 37
    SUPPORT_ACT_QUANTIZERS,
)
38
from .imperative.ptq_quantizer import (
39 40
    SUPPORT_WT_QUANTIZERS,
)
41
from .imperative.ptq_registry import (
42 43
    PTQRegistry,
)
44 45 46 47
from .imperative.ptq import (
    ImperativePTQ,
)
from .imperative.qat import (
48 49
    ImperativeQuantAware,
)
50 51 52

from .config import QuantConfig
from .base_quanter import BaseQuanter
53
from .base_observer import BaseObserver
54
from .factory import quanter
55
from .qat import QAT
56
from .ptq import PTQ
57 58 59 60

__all__ = [
    "QuantConfig",
    "BaseQuanter",
61
    "BaseObserver",
62
    "quanter",
63
    "QAT",
64
    "PTQ",
65
]