diff options
author | Vijay Vasudevan <vrv@google.com> | 2016-07-26 12:34:55 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-07-26 13:48:00 -0700 |
commit | a36e322c69111cc74af417a26df3fddd3d0b9a6c (patch) | |
tree | cf0a6bf358570753a32b1a67b0708af9494a8ed9 | |
parent | 053fc50b2cbb1979cbed1662c3d964c36fdafecd (diff) |
Annotate shape functions for all no_outputs currently specified
in Python.
Change: 128508247
-rw-r--r-- | tensorflow/core/ops/control_flow_ops.cc | 12 | ||||
-rw-r--r-- | tensorflow/core/ops/no_op.cc | 8 |
2 files changed, 12 insertions, 8 deletions
diff --git a/tensorflow/core/ops/control_flow_ops.cc b/tensorflow/core/ops/control_flow_ops.cc index 0c1b124f22..121a38d7d8 100644 --- a/tensorflow/core/ops/control_flow_ops.cc +++ b/tensorflow/core/ops/control_flow_ops.cc @@ -245,15 +245,17 @@ output: The same tensor as `input`. // -------------------------------------------------------------------------- REGISTER_OP("ControlTrigger") - .SetShapeFn(shape_inference::UnchangedShape) - .Doc(R"doc( -Does nothing. Serves as a control trigger for scheduling. Only useful as a -placeholder for control edges. -)doc"); + .SetShapeFn(shape_inference::NoOutputs) + .Doc(R"docstring( +Does nothing. Serves as a control trigger for scheduling. + +Only useful as a placeholder for control edges. +)docstring"); // -------------------------------------------------------------------------- REGISTER_OP("Abort") .Attr("error_msg: string = ''") + .SetShapeFn(shape_inference::NoOutputs) .Doc(R"doc( Raise a exception to abort the process when called. diff --git a/tensorflow/core/ops/no_op.cc b/tensorflow/core/ops/no_op.cc index ccec585118..94eaec3fdf 100644 --- a/tensorflow/core/ops/no_op.cc +++ b/tensorflow/core/ops/no_op.cc @@ -13,13 +13,15 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ +#include "tensorflow/core/framework/common_shape_fns.h" #include "tensorflow/core/framework/op.h" namespace tensorflow { +using shape_inference::InferenceContext; + REGISTER_OP("NoOp") - .Doc(R"doc( -Does nothing. Only useful as a placeholder for control edges. -)doc"); + .SetShapeFn(shape_inference::NoOutputs) + .Doc("Does nothing. Only useful as a placeholder for control edges."); } // namespace tensorflow |