diff options
author | 2017-10-30 10:44:36 -0700 | |
---|---|---|
committer | 2017-10-30 10:51:22 -0700 | |
commit | cef680b5320f85d155d6e16c607021e7182c5df6 (patch) | |
tree | b300406b2483f11ce50fe13380b5b438836ca1ae /tensorflow/core/graph/graph_constructor.cc | |
parent | e8ac0b48f443879d9e3d516b0b3a151978128423 (diff) |
Enable shape inference on functions in grappler.
PiperOrigin-RevId: 173914941
Diffstat (limited to 'tensorflow/core/graph/graph_constructor.cc')
-rw-r--r-- | tensorflow/core/graph/graph_constructor.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tensorflow/core/graph/graph_constructor.cc b/tensorflow/core/graph/graph_constructor.cc index 9432775ff3..8fe4f535fb 100644 --- a/tensorflow/core/graph/graph_constructor.cc +++ b/tensorflow/core/graph/graph_constructor.cc @@ -846,9 +846,10 @@ Status GraphConstructor::Convert() { } } - // TODO(skyewm): remove conditional when b/35715995 ("Functions lack shape - // inference") is resolved. - if (g_->flib_def().Find(node_def->name()) == nullptr) { + // Function shape inference is supported on an opt-in basis per + // ShapeRefiner. + if (refiner_->function_shape_inference_supported() || + g_->flib_def().Find(node_def->name()) == nullptr) { TF_RETURN_IF_ERROR(ValidateShape(node)); } |