aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/common_shape_fns.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/framework/common_shape_fns.cc')
-rw-r--r--tensorflow/core/framework/common_shape_fns.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/tensorflow/core/framework/common_shape_fns.cc b/tensorflow/core/framework/common_shape_fns.cc
index 9e0f6d3be1..d75280dd5c 100644
--- a/tensorflow/core/framework/common_shape_fns.cc
+++ b/tensorflow/core/framework/common_shape_fns.cc
@@ -1200,6 +1200,15 @@ Status ScatterNdUpdateShape(InferenceContext* c) {
return Status::OK();
}
+Status ExplicitShape(InferenceContext* c) {
+ PartialTensorShape shape;
+ TF_RETURN_IF_ERROR(c->GetAttr("shape", &shape));
+ ShapeHandle output_shape;
+ TF_RETURN_IF_ERROR(c->MakeShapeFromPartialTensorShape(shape, &output_shape));
+ c->set_output(0, output_shape);
+ return Status::OK();
+}
+
} // namespace shape_inference
} // namespace tensorflow