Internal change

PiperOrigin-RevId: 251371868
This commit is contained in:
A. Unique TensorFlower 2019-06-03 21:54:25 -07:00 committed by TensorFlower Gardener
parent 2892a6844c
commit d08667249f

View File

@ -75,6 +75,8 @@ def strip_unused(input_graph_def, input_node_names, output_node_names,
if "_output_shapes" in node.attr:
placeholder_node.attr["_output_shapes"].CopyFrom(node.attr[
"_output_shapes"])
if "shape" in node.attr:
placeholder_node.attr["shape"].CopyFrom(node.attr["shape"])
inputs_replaced_graph_def.node.extend([placeholder_node])
else:
inputs_replaced_graph_def.node.extend([copy.deepcopy(node)])