MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / QuantizeWeight

Function QuantizeWeight

tensorflow/lite/tools/optimize/quantization_utils.cc:358–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358TfLiteStatus QuantizeWeight(ModelT* model, TensorT* tensor, bool per_channel,
359 int per_axis_index) {
360 // TODO(suharshs): Currently we conflate quantizing weights and constants. Its
361 // possible that the right thing to do is asymmetric quantize the weight. Add
362 // support for this.
363 if (per_channel) {
364 return SymmetricQuantizeTensorPerChannel(model, tensor, per_axis_index);
365 } else {
366 return SymmetricQuantizeTensor(model, tensor);
367 }
368}
369
370void QuantizeActivation(TensorT* tensor) {
371 GetAsymmetricQuantizationParams(

Callers 1

QuantizeOpInputFunction · 0.85

Calls 2

SymmetricQuantizeTensorFunction · 0.85

Tested by

no test coverage detected