aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/kernels/svdf.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-06-29 13:28:40 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-29 13:31:21 -0700
commitd3c0598ff7650b9d25eb01f792a6106428163df5 (patch)
treecd2a2e35cc743a8273bd9b34f019b425dbf85e6d /tensorflow/contrib/lite/kernels/svdf.cc
parentf95b37f6d1b5fd3c9ef71d974763c2248f690b54 (diff)
Use the same convention for the scale parameter in hybrid ops as well.
PiperOrigin-RevId: 202698287
Diffstat (limited to 'tensorflow/contrib/lite/kernels/svdf.cc')
-rw-r--r--tensorflow/contrib/lite/kernels/svdf.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/contrib/lite/kernels/svdf.cc b/tensorflow/contrib/lite/kernels/svdf.cc
index 43ac3a2ce8..22eebdd4ce 100644
--- a/tensorflow/contrib/lite/kernels/svdf.cc
+++ b/tensorflow/contrib/lite/kernels/svdf.cc
@@ -382,11 +382,12 @@ TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
// the Eval function.
// TODO(alanchiao): refactor logic out into dequantize function.
if (!op_data->float_weights_time_initialized) {
- const float inv_scale = 1.0 / weights_time->params.scale;
+ const float dequantization_scale = weights_time->params.scale;
const int8_t* weights_time_ptr =
reinterpret_cast<int8_t*>(weights_time->data.uint8);
for (int i = 0; i < NumElements(float_weights_time); ++i) {
- float_weights_time->data.f[i] = weights_time_ptr[i] * inv_scale;
+ float_weights_time->data.f[i] =
+ weights_time_ptr[i] * dequantization_scale;
}
op_data->float_weights_time_initialized = true;
}