diff options
author | Skye Wanderman-Milne <skyewm@google.com> | 2018-07-12 12:51:23 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-12 12:56:39 -0700 |
commit | 546322104425cc1cc70afeb7c0cfc1ec36ed0b41 (patch) | |
tree | ef89a93d4be694f5db6b829e3b74e796a01c643b /tensorflow/c | |
parent | 86f84b066706db97f7b3fd184249fdbd54abb05e (diff) |
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
Diffstat (limited to 'tensorflow/c')
-rw-r--r-- | tensorflow/c/python_api.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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); |