/usr/local/lib64/python3.6/site-packages/torch/ao/quantization/__pycache__
NameSizeModeActions
fake_quantize.cpython-36.pyc139970644editdlrm
fuser_method_mappings.cpython-36.pyc45210644editdlrm
fuse_modules.cpython-36.pyc50120644editdlrm
observer.cpython-36.pyc392270644editdlrm
qconfig.cpython-36.pyc85840644editdlrm
quantization_mappings.cpython-36.pyc68670644editdlrm
quantize.cpython-36.pyc189010644editdlrm
quantize_jit.cpython-36.pyc86310644editdlrm
quant_type.cpython-36.pyc6340644editdlrm
stubs.cpython-36.pyc27160644editdlrm
utils.cpython-36.pyc66890644editdlrm
_correct_bias.cpython-36.pyc44490644editdlrm
_equalize.cpython-36.pyc57040644editdlrm
_learnable_fake_quantize.cpython-36.pyc64550644editdlrm
__init__.cpython-36.pyc2530644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/torch/ao/quantization/__pycache__/stubs.cpython-36.pyc (2716B)
3 Eg?ã@sFddlmZGdd„dejƒZGdd„dejƒZGdd„dejƒZdS) é)Únncs*eZdZdZd‡fdd„ Zdd„Z‡ZS)Ú QuantStubaQuantize stub module, before calibration, this is same as an observer, it will be swapped as `nnq.Quantize` in `convert`. Args: qconfig: quantization configuration for the tensor, if qconfig is not provided, we will get qconfig from parent modules Ncstt|ƒjƒ|r||_dS)N)ÚsuperrÚ__init__Úqconfig)Úselfr)Ú __class__©úG/usr/local/lib64/python3.6/site-packages/torch/ao/quantization/stubs.pyr szQuantStub.__init__cCs|S)Nr )rÚxr r r ÚforwardszQuantStub.forward)N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rr Ú __classcell__r r )rr rsrcs(eZdZdZ‡fdd„Zdd„Z‡ZS)Ú DeQuantStubz…Dequantize stub module, before calibration, this is same as identity, this will be swapped as `nnq.DeQuantize` in `convert`. cstt|ƒjƒdS)N)rrr)r)rr r rszDeQuantStub.__init__cCs|S)Nr )rr r r r r szDeQuantStub.forward)r rrrrr rr r )rr rs rcs8eZdZUdZeeej  ‡fdd„Z dd„Z ‡Z S)Ú QuantWrapperaçA wrapper class that wraps the input module, adds QuantStub and DeQuantStub and surround the call to module with call to quant and dequant modules. This is used by the `quantization` utility functions to add the quant and dequant modules, before `convert` function `QuantStub` will just be observer, it observes the input tensor, after `convert`, `QuantStub` will be swapped to `nnq.Quantize` which does actual quantization. Similarly for `DeQuantStub`. cs\tt|ƒjƒt|dƒr|jnd}|jdt|ƒƒ|jdtƒƒ|jd|ƒ|j|j ƒdS)NrÚquantÚdequantÚmodule) rrrÚhasattrrZ add_modulerrZtrainZtraining)rrr)rr r r/s  zQuantWrapper.__init__cCs|j|ƒ}|j|ƒ}|j|ƒS)N)rrr)rÚXr r r r 7s  zQuantWrapper.forward)r rrrrrrrrÚModulerrr rr r )rr r s  rN)Ztorchrrrrrr r r r Ús