diff options
author | 2017-06-01 18:40:21 -0700 | |
---|---|---|
committer | 2017-06-01 18:43:31 -0700 | |
commit | 9ae941c4a8c2d6e5a87c7a200ebde5bd0b07e5b2 (patch) | |
tree | 7a6aa43b0b04bd45501933132b94e8191447b5c4 /tensorflow/core/grappler/utils.cc | |
parent | 69075f3546dfc29dbef8b7c5d990f3af094cbd5f (diff) |
Turn reductions along an empty set of dimensions into identity nodes.
PiperOrigin-RevId: 157792209
Diffstat (limited to 'tensorflow/core/grappler/utils.cc')
-rw-r--r-- | tensorflow/core/grappler/utils.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/core/grappler/utils.cc b/tensorflow/core/grappler/utils.cc index 06ef61a961..b7a04f4423 100644 --- a/tensorflow/core/grappler/utils.cc +++ b/tensorflow/core/grappler/utils.cc @@ -83,6 +83,10 @@ string ParseNodeName(const string& name, int* position) { } } +bool IsControlInput(const string& name) { + return !name.empty() && name[0] == '^'; +} + string NodeName(const string& name) { int position; return ParseNodeName(name, &position); |