MCPcopy Create free account
hub / github.com/Tencent/PocketFlow / __scale

Method __scale

learners/uniform_quantization/utils.py:201–231  ·  view source on GitHub ↗

linear scale function Args: * w: A Tensor (weights or activation output), the shape is [bucket_size, bucekt_num] if use_buckets else the original size. * mode: A string, 'weight' or 'activation' Returns: * A Tensor, the normalized weights * A Tensor, alpha, scalar

(self, w, mode)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

__uniform_quantizeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected