提交 3c31f11c authored 作者: Frederic's avatar Frederic

crash fix. viewed_by wasn't updated to trac the origin as it should.

上级 6eae2985
......@@ -722,9 +722,10 @@ class ProfileStats(object):
# the output could be different then the
# input.
assert isinstance(ins, theano.Variable)
# we keep trac of view only again the original
view_of[out] = view_of.get(ins, ins)
viewed_by[ins].append(out)
# we keep trac of view only again the origin
origin = view_of.get(ins, ins)
view_of[out] = origin
viewed_by[origin].append(out)
else:
running_memory_size += var_mem[out]
node_memory_size += var_mem[out]
......@@ -855,8 +856,9 @@ class ProfileStats(object):
# input.
assert isinstance(ins, theano.Variable)
# We keep trac of view only again the original
view_of_temp[out] = view_of_temp.get(ins, ins)
viewed_by_temp[ins].append(out)
origin = view_of_temp.get(ins, ins)
view_of_temp[out] = origin
viewed_by_temp[origin].append(out)
else:
mem_created += var_mem[out]
idx += 1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论