aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/framework/importer.py
diff options
context:
space:
mode:
authorGravatar Geoffrey Irving <geoffreyi@google.com>2016-01-26 13:37:20 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2016-01-26 14:29:17 -0800
commita18d48f80f118b28d351001a9b4c47613e228f34 (patch)
treed6551bc0685db16c0a3e12e70b59fce49c3cff3b /tensorflow/python/framework/importer.py
parent632c90068a1ecae1a7ae808628922eeb2022d38c (diff)
Change GraphDef versions to use version, min_consumer, min_producer
Since all GraphDef versions to date are forwards compatible, we make no attempt to merge old-style and new-style GraphDef version information. The old int32 version field is ignored (and deprecated) and the new VersionDef versions field defaults to producer 0, min_consumer 0 if left out. As a benefit, once this CL is in we can immediately bump the scalar strictness GraphDef version, since consumers will either ignore the new versions (before this CL) or be forward compatible (after this CL). Later, I'll use the same mechanism and protobuf to add versioning to checkpoints. Change: 113091281
Diffstat (limited to 'tensorflow/python/framework/importer.py')
-rw-r--r--tensorflow/python/framework/importer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/framework/importer.py b/tensorflow/python/framework/importer.py
index c2dfac7cf0..06876fdb44 100644
--- a/tensorflow/python/framework/importer.py
+++ b/tensorflow/python/framework/importer.py
@@ -215,7 +215,7 @@ def import_graph_def(graph_def, input_map=None, return_elements=None,
with ops.op_scope(input_map.values(), name, 'import'):
g = ops.get_default_graph()
- g.graph_def_version = graph_def.version
+ g.graph_def_versions.CopyFrom(graph_def.versions)
with ops.name_scope('_inputs'):
input_map = {k: ops.convert_to_tensor(v) for k, v in input_map.items()}