未验证 提交 065797b0 编写于 作者: C channings 提交者: GitHub

Merge pull request #4 from PaddlePaddle/develop

pull from PaddlePaddle/develop
......@@ -591,7 +591,7 @@ class TFOpMapper(OpMapper):
# to change [192, -1]->[-1, 192], allways put -1 in the first dimension
# optimization for Paddle-Lite
in_shape = input.out_shapes[0]
if is_variable and in_shape.count(-1) < 1:
if not is_variable and in_shape.count(-1) < 1:
total_size = 1
for i in range(len(in_shape)):
total_size *= in_shape[i]
......
......@@ -74,7 +74,7 @@ class TFOpMapperNHWC(OpMapper):
unsupported_ops = set()
sys.stderr.write("Total nodes: {}\n".format(len(self.graph.topo_sort)))
for i, node_name in enumerate(self.graph.topo_sort):
sys.stderr.write("\rConverting node {} ... ".format(i))
sys.stderr.write("\rConverting node {} ... ".format(i + 1))
node = self.graph.get_node(node_name)
op = node.layer_type
if op in self.directly_map_ops:
......@@ -99,7 +99,7 @@ class TFOpMapperNHWC(OpMapper):
for op in unsupported_ops:
print("========== {} ============".format(op))
sys.exit(-1)
sys.stderr.write("\nDone\n")
sys.stderr.write("\nDone!\n")
def add_omit_nodes(self, in_node_name, out_node_name):
in_node = self.graph.get_node(in_node_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册