MCPcopy Create free account
hub / github.com/alibaba/nann / Quantize

Function Quantize

tensorflow/tensorflow/contrib/quantize/python/quantize.py:47–226  ·  view source on GitHub ↗

Updates graph with quantization operations. Currently we quantize the following tensors: * Conv/MatMul: Quantize the weights if it matches. * Activation: Quantize the output if it matches. * Bypass/Post-activation Bypass: Quantize both input and output if it matches. Args: graph:

(graph,
             is_training,
             weight_bits=8,
             activation_bits=8,
             symmetric=False,
             ema_decay=0.999,
             quant_delay=None,
             vars_collection=ops.GraphKeys.GLOBAL_VARIABLES,
             scope=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 9

ConsumerOperationsMethod · 0.95
_FindLayersToQuantizeFunction · 0.85
_GetContextFromOpFunction · 0.85
_InsertQuantOpFunction · 0.85
anyFunction · 0.85
infoMethod · 0.80
groupMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected