aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/kernels/bidirectional_sequence_lstm.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-05-03 23:36:02 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-04 10:43:07 -0700
commitda0dcb21501b765932e392ae710ebbecefeb309c (patch)
treeb0547999a958c98316cad7f6b90a14059569b733 /tensorflow/contrib/lite/kernels/bidirectional_sequence_lstm.cc
parent8ec11ae8eb7b97caced73ed3971209236e2aef5c (diff)
Internal change.
PiperOrigin-RevId: 195374319
Diffstat (limited to 'tensorflow/contrib/lite/kernels/bidirectional_sequence_lstm.cc')
-rw-r--r--tensorflow/contrib/lite/kernels/bidirectional_sequence_lstm.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/tensorflow/contrib/lite/kernels/bidirectional_sequence_lstm.cc b/tensorflow/contrib/lite/kernels/bidirectional_sequence_lstm.cc
index 3ac0210f36..a35ba23ced 100644
--- a/tensorflow/contrib/lite/kernels/bidirectional_sequence_lstm.cc
+++ b/tensorflow/contrib/lite/kernels/bidirectional_sequence_lstm.cc
@@ -365,8 +365,7 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TfLiteIntArrayFree(node->temporaries);
node->temporaries = TfLiteIntArrayCreate(2);
node->temporaries->data[0] = *scratch_tensor_index;
- TfLiteTensor* fw_scratch_buffer =
- &context->tensors[node->temporaries->data[0]];
+ TfLiteTensor* fw_scratch_buffer = GetTemporary(context, node, /*index=*/0);
fw_scratch_buffer->type = input->type;
fw_scratch_buffer->allocation_type = kTfLiteArenaRw;
@@ -434,8 +433,7 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
// Create a scratch buffer tensor.
node->temporaries->data[1] = *(scratch_tensor_index) + 1;
- TfLiteTensor* bw_scratch_buffer =
- &context->tensors[node->temporaries->data[1]];
+ TfLiteTensor* bw_scratch_buffer = GetTemporary(context, node, /*index=*/1);
bw_scratch_buffer->type = input->type;
bw_scratch_buffer->allocation_type = kTfLiteArenaRw;