mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
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
18 lines
637 B
Python
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())
|