aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/cc/framework/scope.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-03-03 14:14:16 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-03-03 14:26:26 -0800
commitb177e3720721dea593f1f15ba731ab351e87d298 (patch)
tree6a58e524addc6b2518df22fee094b9a712576910 /tensorflow/cc/framework/scope.cc
parent1dc89c1ab1bee51ae40f97994ef81ac3d6b1391c (diff)
Add the graphdef version to InferenceContext and to ShapeRefiner::AddNode.
Use this to allow loading reductions saved with older graphdefs. Change GraphConstructor to not increase the version when importing, but instead take the min of all versions. Change: 149152437
Diffstat (limited to 'tensorflow/cc/framework/scope.cc')
-rw-r--r--tensorflow/cc/framework/scope.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/cc/framework/scope.cc b/tensorflow/cc/framework/scope.cc
index c5629dbd6d..571c6e1e57 100644
--- a/tensorflow/cc/framework/scope.cc
+++ b/tensorflow/cc/framework/scope.cc
@@ -118,7 +118,8 @@ Scope::Impl::Impl(Graph* graph, Status* status, NameMap* name_map,
Scope Scope::NewRootScope() {
Graph* graph = new Graph(OpRegistry::Global());
- ShapeRefiner* refiner = new ShapeRefiner(graph->op_registry());
+ ShapeRefiner* refiner =
+ new ShapeRefiner(graph->versions().producer(), graph->op_registry());
return Scope(new Impl(graph, new Status, new Impl::NameMap, refiner));
}