提交 26cdfa6e authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Moved statement out of try block

Since the 'finally' block requires 'add_stack_trace_on_call' to be defined, technically it is better to define it out of the 'try' block. Most likely doesn't matter here though.
上级 10df577e
......@@ -991,10 +991,10 @@ class FunctionMaker(object):
# optimize the env
compute_test_value_orig = theano.config.compute_test_value
add_stack_trace_on_call = gof.Op.add_stack_trace_on_call
try:
theano.config.compute_test_value = "off"
start_optimizer = time.time()
add_stack_trace_on_call = gof.Op.add_stack_trace_on_call
gof.Op.add_stack_trace_on_call = False
optimizer(env)
end_optimizer = time.time()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论