提交 591dc55d authored 作者: Reyhane Askari's avatar Reyhane Askari

added assertionError

上级 bfb4abf9
...@@ -2510,10 +2510,14 @@ class EquilibriumOptimizer(NavigatorOptimizer): ...@@ -2510,10 +2510,14 @@ class EquilibriumOptimizer(NavigatorOptimizer):
end_nb_nodes = len(fgraph.apply_nodes) end_nb_nodes = len(fgraph.apply_nodes)
if max_use_abort: if max_use_abort:
_logger.error("EquilibriumOptimizer max'ed out by '%s'" % opt_name + msg = ("EquilibriumOptimizer max'ed out by '%s'" % opt_name +
". You can safely raise the current threshold of " + ". You can safely raise the current threshold of " +
"%f with the theano flag 'optdb.max_use_ratio'." % "%f with the theano flag 'optdb.max_use_ratio'." %
config.optdb.max_use_ratio) config.optdb.max_use_ratio)
if theano.config.on_opt_error == 'raise':
raise AssertionError(msg)
else:
_logger.error(msg)
fgraph.remove_feature(change_tracker) fgraph.remove_feature(change_tracker)
assert len(loop_process_count) == len(loop_timing) assert len(loop_process_count) == len(loop_timing)
assert len(loop_process_count) == len(global_opt_timing) assert len(loop_process_count) == len(global_opt_timing)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论