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