提交 5ec4c302 authored 作者: abergeron's avatar abergeron

Merge pull request #2385 from nouiz/small

Crash fix and change scan.allow_gc default.
......@@ -667,14 +667,15 @@ class ProfileStats(object):
v = out.type.get_size(sh)
sum_dense += v
else:
v = 'Unknown'
v = 0 # 'Unknown'
else:
v = 'Variable isnt created'
v = 0 # 'Variable isnt created'
var_mem[out] = v
fct_memory[node.fgraph][node].append(v)
fct_shapes[node.fgraph][node].append(sh)
node_mem[node] = sum_dense
del v
# Find the function that used the most of that statistic
max_sum_size = 0
......
......@@ -157,7 +157,7 @@ N.B.:
# If the op was compiled, print the optimized version.
outputs = s.owner.op.fn.maker.fgraph.outputs
else:
outputs = s.owner.op.output
outputs = s.owner.op.outputs
for idx, i in enumerate(outputs):
if hasattr(i, 'owner') and hasattr(i.owner, 'op'):
if isinstance(i.owner.op, theano.scan_module.scan_op.Scan):
......
......@@ -40,8 +40,8 @@ _logger = logging.getLogger('theano.scan_module.scan_op')
from theano.configparser import AddConfigVar, BoolParam
AddConfigVar('scan.allow_gc',
"Allow/disallow gc inside of Scan (default: config.allow_gc)",
BoolParam(lambda: config.allow_gc))
"Allow/disallow gc inside of Scan (default: True)",
BoolParam(True))
class Scan(PureOp):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论