diff options
author | 2018-08-31 16:15:25 -0700 | |
---|---|---|
committer | 2018-08-31 16:20:27 -0700 | |
commit | 87562600ab6eb666af165d48f42f5a4c1c6c8831 (patch) | |
tree | 066f264d4815f3294476e5b429ed984a5af612ca | |
parent | 0fffc1bde7f85c3c5b985bf30500c53ace6c81eb (diff) |
Improving logging of tensors being quantized.
PiperOrigin-RevId: 211160708
-rw-r--r-- | tensorflow/contrib/lite/tools/optimize/quantize_weights.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/contrib/lite/tools/optimize/quantize_weights.cc b/tensorflow/contrib/lite/tools/optimize/quantize_weights.cc index df8433dd9b..e0ed7c7946 100644 --- a/tensorflow/contrib/lite/tools/optimize/quantize_weights.cc +++ b/tensorflow/contrib/lite/tools/optimize/quantize_weights.cc @@ -222,7 +222,8 @@ TfLiteStatus AsymmetricQuantizeTensor(ModelT* model, TensorT* tensor) { BufferT* buffer = model->buffers[tensor->buffer].get(); float* float_data = reinterpret_cast<float*>(buffer->data.data()); const uint64_t num_elements = NumElements(tensor); - LOG(INFO) << "Quantizing tensor with " << num_elements << " elements."; + LOG(INFO) << "Quantizing tensor " << tensor->name << " with " << num_elements + << " elements for float evaluation."; // Compute the quantization params. float min_value = *std::min_element(float_data, float_data + num_elements); @@ -265,7 +266,8 @@ TfLiteStatus SymmetricQuantizeTensor(ModelT* model, TensorT* tensor) { BufferT* buffer = model->buffers[tensor->buffer].get(); float* float_data = reinterpret_cast<float*>(buffer->data.data()); const uint64_t num_elements = NumElements(tensor); - LOG(INFO) << "Quantizing tensor with " << num_elements << " elements."; + LOG(INFO) << "Quantizing tensor " << tensor->name << " with " << num_elements + << " elements for hybrid evaluation."; std::vector<int8_t> quantized_buffer; quantized_buffer.resize(num_elements); |