提交 d7125bf2 authored 作者: Roy Xue's avatar Roy Xue

Check not then.gof.Constant

上级 62a7d57b
...@@ -694,7 +694,7 @@ class Function(object): ...@@ -694,7 +694,7 @@ class Function(object):
# 1.no allow_gc return False 2.has allow_gc, if allow_gc is False, return True # 1.no allow_gc return False 2.has allow_gc, if allow_gc is False, return True
if not getattr(self.fn, 'allow_gc', True): if not getattr(self.fn, 'allow_gc', True):
for key in self.fn.storage_map.keys(): for key in self.fn.storage_map.keys():
if isinstance(key, theano.tensor.TensorVariable): if not isinstance(key, theano.gof.Constant):
self.fn.storage_map[key][0] = None self.fn.storage_map[key][0] = None
for node in self.node_op_list: for node in self.node_op_list:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论