aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/models
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-05-11 19:38:48 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-11 19:41:29 -0700
commit52e2698ac969a0f82c6ce901f80f04818ca8ac4e (patch)
tree5b89fa879c61cac2f3b64d5edbf405ad616edde5 /tensorflow/contrib/lite/models
parent84b5938aaee991d6909e16e56c66bf88e8843fbb (diff)
Making GetInput from kernel_util.h return a pointer to const data.
PiperOrigin-RevId: 196340200
Diffstat (limited to 'tensorflow/contrib/lite/models')
-rw-r--r--tensorflow/contrib/lite/models/smartreply/ops/extract_feature.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/lite/models/smartreply/ops/extract_feature.cc b/tensorflow/contrib/lite/models/smartreply/ops/extract_feature.cc
index f97a6486d6..29c8ad2286 100644
--- a/tensorflow/contrib/lite/models/smartreply/ops/extract_feature.cc
+++ b/tensorflow/contrib/lite/models/smartreply/ops/extract_feature.cc
@@ -61,7 +61,7 @@ bool IsValidNgram(const tflite::StringRef& strref) {
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TfLiteIntArray* outputSize1 = TfLiteIntArrayCreate(1);
TfLiteIntArray* outputSize2 = TfLiteIntArrayCreate(1);
- TfLiteTensor* input = GetInput(context, node, 0);
+ const TfLiteTensor* input = GetInput(context, node, 0);
int dim = input->dims->data[0];
if (dim == 0) {
// TFLite non-string output should have size greater than 0.
@@ -76,7 +76,7 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
}
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
- TfLiteTensor* input = GetInput(context, node, 0);
+ const TfLiteTensor* input = GetInput(context, node, 0);
int num_strings = tflite::GetStringCount(input);
TfLiteTensor* label = GetOutput(context, node, 0);
TfLiteTensor* weight = GetOutput(context, node, 1);