aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/meta_graph_transform
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-09-19 23:12:22 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-09-19 23:15:45 -0700
commit0de5f7cecb785b03d652479ac4f359b284e8c3a5 (patch)
tree3e7d54c7ebdb029158a73e702a773a50cf917cfe /tensorflow/contrib/meta_graph_transform
parent11e643e05c762bef356a578edeba8b642b2279f4 (diff)
Relax the regex expression for matching tensor names to support names that have a one after a '/'. E.g. /foo/1_bar.
PiperOrigin-RevId: 169355016
Diffstat (limited to 'tensorflow/contrib/meta_graph_transform')
-rw-r--r--tensorflow/contrib/meta_graph_transform/meta_graph_transform.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/meta_graph_transform/meta_graph_transform.py b/tensorflow/contrib/meta_graph_transform/meta_graph_transform.py
index 72494f54f5..f914391ecc 100644
--- a/tensorflow/contrib/meta_graph_transform/meta_graph_transform.py
+++ b/tensorflow/contrib/meta_graph_transform/meta_graph_transform.py
@@ -644,7 +644,7 @@ def _is_removed_mentioned(s, removed_op_names):
# /foo/bar. This regex ensures that we handle these two nodes
# as separate entities. It matches on nodes having names in the form of
# '/foo/bar_x' as well as nodes having names in the form of 'foo.'
- s_names = re.findall(r'((?:[\/]?[a-zA-Z]+[0-9\_]*)*)', compat.as_str_any(s))
+ s_names = re.findall(r'((?:[\/]?[a-zA-Z0-9\_]*)*)', compat.as_str_any(s))
for removed_op_name in removed_op_names:
for s_name in s_names:
if s_name.endswith(removed_op_name):