提交 e5c26b12 编写于 作者: L liuqi

Fix bug of memory optimization when no output shape.

上级 279139fc
......@@ -47,6 +47,9 @@ class MemoryOptimizer(object):
# reuse mem
mem_id = self.idle_mem.pop()
if not op.output_shape:
print('There is no output shape information to do memory optimization.')
return
op.mem_id = mem_id
self.op_mem[self._op_to_tensor(op)] = mem_id
if mem_id not in self.mem_block:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册