Handle StatelessWhile in OpHint.

PiperOrigin-RevId: 260748862
This commit is contained in:
Saurabh Saxena 2019-07-30 10:45:40 -07:00 committed by TensorFlower Gardener
parent 203f166d98
commit fdc9600788

View File

@ -854,7 +854,7 @@ def _find_children_hints(call, graph_def):
if n in reachable_by_output: if n in reachable_by_output:
if n not in reachable_by_input and n not in output_nodes_set: if n not in reachable_by_input and n not in output_nodes_set:
# special handle for while loop function def. # special handle for while loop function def.
if node.op == "While": if node.op == "While" or node.op == "StatelessWhile":
body_name = node.attr["body"].func.name body_name = node.attr["body"].func.name
inputs_outside_loop = node.input inputs_outside_loop = node.input
for function_def in graph_def.library.function: for function_def in graph_def.library.function: