diff --git a/tensorflow/core/common_runtime/shape_refiner.cc b/tensorflow/core/common_runtime/shape_refiner.cc index 7288ecb143550d605a682cb37cf709947fa92d51..2f65abde0af95ebafcbf7a59f89d37f64da66283 100644 --- a/tensorflow/core/common_runtime/shape_refiner.cc +++ b/tensorflow/core/common_runtime/shape_refiner.cc @@ -203,6 +203,9 @@ Status ShapeRefiner::EvaluateConstantTensorForEdge(const Node* node, bool is_constant_graph = false; Graph subgraph(ops_registry_); + auto versions = subgraph.versions(); + versions.set_producer(graph_def_version_); + subgraph.set_versions(versions); // We identify the possibly constant subgraph to evaluate by // recursively iterating backwards through the inputs to 'node'