提交 5b430278 authored 作者: Li's avatar Li 提交者: Frederic

minor changes

上级 fa474bd0
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
========================== ==========================
Frequently Asked Questions Frequently Asked Questions
========================== ==========================
3B
TypeError: object of type 'TensorVariable' has no len() TypeError: object of type 'TensorVariable' has no len()
------------------------------------------------------- -------------------------------------------------------
......
...@@ -1239,6 +1239,7 @@ class FunctionMaker(object): ...@@ -1239,6 +1239,7 @@ class FunctionMaker(object):
add_stack_trace_on_call_orig = gof.Op.add_stack_trace_on_call add_stack_trace_on_call_orig = gof.Op.add_stack_trace_on_call
if need_opt: if need_opt:
try:
# optimize the fgraph # optimize the fgraph
theano.config.compute_test_value = theano.config.compute_test_value_opt theano.config.compute_test_value = theano.config.compute_test_value_opt
gof.Op.add_stack_trace_on_call = False gof.Op.add_stack_trace_on_call = False
...@@ -1254,7 +1255,7 @@ class FunctionMaker(object): ...@@ -1254,7 +1255,7 @@ class FunctionMaker(object):
#Add deep copy to respect the memory interface #Add deep copy to respect the memory interface
insert_deepcopy(fgraph, inputs, outputs + additional_outputs) insert_deepcopy(fgraph, inputs, outputs + additional_outputs)
# fgraph is already optimized finally:
theano.config.compute_test_value = compute_test_value_orig theano.config.compute_test_value = compute_test_value_orig
gof.Op.add_stack_trace_on_call = add_stack_trace_on_call_orig gof.Op.add_stack_trace_on_call = add_stack_trace_on_call_orig
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论