From 546322104425cc1cc70afeb7c0cfc1ec36ed0b41 Mon Sep 17 00:00:00 2001 From: Skye Wanderman-Milne Date: Thu, 12 Jul 2018 12:51:23 -0700 Subject: Fix bug in SetResourceHandleShapeAndType. Prior to this change, captured resource variables in TF functions (or any captured resource tensors) would not have shape information. PiperOrigin-RevId: 204347306 --- tensorflow/c/python_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tensorflow/c') diff --git a/tensorflow/c/python_api.cc b/tensorflow/c/python_api.cc index e18fdf6c57..8486b585c8 100644 --- a/tensorflow/c/python_api.cc +++ b/tensorflow/c/python_api.cc @@ -155,7 +155,7 @@ void SetResourceHandleShapeAndType(TF_Graph* graph, TF_Output output, tensorflow::shape_inference::ShapeHandle shape; status->status = ic->MakeShapeFromShapeProto(shape_and_type_proto.shape(), &shape); - if (status->status.ok()) return; + if (!status->status.ok()) return; shapes_and_types.emplace_back(shape, shape_and_type_proto.dtype()); } ic->set_output_handle_shapes_and_types(output.index, shapes_and_types); -- cgit v1.2.3