pytorch/torch/quantization/QConfig.py
Jerry Zhang c475ef72f9 Change order of activation and weight in QConfig (#25950)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25950

I feel that is a more natural order

Test Plan:
python test/test_quantizer.py

Imported from OSS

Differential Revision: D17294963

fbshipit-source-id: ed8ffdfe788a5e81966bda856e8d046ab68ee229
2019-09-11 09:51:01 -07:00

18 lines
637 B
Python

from __future__ import absolute_import, division, print_function, unicode_literals
from collections import namedtuple
from .observer import *
from .fake_quantize import *
QConfig = namedtuple('QConfig',
['activation', 'weight'])
default_qconfig = QConfig(activation=default_observer(),
weight=default_weight_observer())
QConfig_dynamic = namedtuple('QConfig_dynamic', ['weight'])
default_dynamic_qconfig = QConfig_dynamic(weight=default_weight_observer())
default_qat_qconfig = QConfig(activation=default_fake_quant(),
weight=default_weight_fake_quant())