From d08667249fd064ddf41777eea6debf4474e6622a Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 3 Jun 2019 21:54:25 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 251371868 --- tensorflow/python/tools/strip_unused_lib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tensorflow/python/tools/strip_unused_lib.py b/tensorflow/python/tools/strip_unused_lib.py index a2766be93b0..a117805f525 100644 --- a/tensorflow/python/tools/strip_unused_lib.py +++ b/tensorflow/python/tools/strip_unused_lib.py @@ -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)])