From: A. Unique TensorFlower Date: Thu, 29 Mar 2018 04:11:16 +0000 (-0700) Subject: Fix TensorList decoding bug. Thanks to Alexandre Passos for finding this. X-Git-Tag: tflite-v0.1.7~67^2^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aeaec465f2f08e32c524e23fb7b0ac016f3dc6a9;p=platform%2Fupstream%2Ftensorflow.git Fix TensorList decoding bug. Thanks to Alexandre Passos for finding this. PiperOrigin-RevId: 190879840 --- diff --git a/tensorflow/core/kernels/list_kernels.cc b/tensorflow/core/kernels/list_kernels.cc index baf0a4a..9e7786f 100644 --- a/tensorflow/core/kernels/list_kernels.cc +++ b/tensorflow/core/kernels/list_kernels.cc @@ -112,6 +112,7 @@ bool TensorList::Decode(const VariantTensorData& data) { dims.push_back(scratch); } } + element_shape = PartialTensorShape(dims); return true; } diff --git a/tensorflow/core/kernels/list_kernels.h b/tensorflow/core/kernels/list_kernels.h index 9733883..8af48f0 100644 --- a/tensorflow/core/kernels/list_kernels.h +++ b/tensorflow/core/kernels/list_kernels.h @@ -83,7 +83,8 @@ class TensorListStack : public OpKernel { DataTypeString(l->element_dtype))); OP_REQUIRES(c, l->element_shape.IsFullyDefined(), errors::InvalidArgument("Tried to stack elements from a list " - "with non-fully-defined shape.")); + "with non-fully-defined shape: ", + l->element_shape.DebugString())); if (num_elements_ != -1) { OP_REQUIRES(c, l->tensors.size() == num_elements_, errors::InvalidArgument("Operation expected a list with ",