| 356 | } |
| 357 | |
| 358 | TfLiteStatus 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 | |
| 370 | void QuantizeActivation(TensorT* tensor) { |
| 371 | GetAsymmetricQuantizationParams( |
no test coverage detected