希特勒自传进入日本教材 网友:政府真的在发疯

paddle.quantization. quanter ( class_name: str ) Callable[[type[BaseQuanter]], type[BaseQuanter]] [source]
百度 菇菇头2014-02-1416:28网络字号:T作者:有一位菇菇头小朋友简称为菇菇头性别:女血型:纠结的AB型爱好:漫画、美食、电影、装文青毕业院校:上海大学数码艺术学院动画专业硕士个人网站:http:///公众微信:mushroomcomic主要经历:初中投身漫画的海洋,从此开始独自摸索,发表过几篇漫画,画过几个小短篇,做过几个小动画,为别人设计过一些小东西,顺便兼职漫画小老师,总之都是没有大成就的小活,完全不值得一提。

Annotation to declare a factory class for quanter.

Parameters

class_name (str) – The name of factory class to be declared.

Examples

>>> # type: ignore
>>> 
>>> # Given codes in ./customized_quanter.py
>>> from paddle.quantization import quanter
>>> from paddle.quantization import BaseQuanter
>>> @quanter("CustomizedQuanter")
>>> class CustomizedQuanterLayer(BaseQuanter):
...     def __init__(self, arg1, kwarg1=None):
...         pass

>>> # Used in ./test.py
>>> # from .customized_quanter import CustomizedQuanter
>>> from paddle.quantization import QuantConfig
>>> arg1_value = "test"
>>> kwarg1_value = 20
>>> quanter = CustomizedQuanter(arg1_value, kwarg1=kwarg1_value)
>>> q_config = QuantConfig(activation=quanter, weight=quanter)