提交 e84e5580 authored 作者: Frederic's avatar Frederic

remoce time_seq_optimizer flag that was not release

profile_optimizer replace it.
上级 147a7155
...@@ -580,26 +580,6 @@ import theano and print the config variable, as in: ...@@ -580,26 +580,6 @@ import theano and print the config variable, as in:
B. log_likelihood_v_given_h B. log_likelihood_v_given_h
C. log_likelihood_h C. log_likelihood_h
.. attribute:: config.time_seq_optimizer
Bool value, default: False
Should each SeqOptimizer object print the time taken by each of its
optimizer. Each SeqOptimizer prints something like this::
SeqOptimizer gpu_opt time 0.014s for 8/9 nodes before/after optimization
0.012573s - ('gpu_local_optimizations', 'EquilibriumOptimizer')
0.001373s - ('gpu_cut_transfers', 'EquilibriumOptimizer')
0.000441s - ('InputToGpuOptimizer', 'InputToGpuOptimizer')
This prints the name of the SeqOptimizer (gpu_opt), the number of
Apply nodes in the graph before (8) and after (9)
optimizations. Then a list of lines, one per optimization
in this SeqOptimizer. The first element is the time
taken by this optimization and then it is a tuple with the name of the
optimization and this class. This list is sorted from the sub
optimization that takes the most time to the optimization that takes
the least time.
.. attribute:: config.time_eq_optimizer .. attribute:: config.time_eq_optimizer
......
...@@ -26,10 +26,6 @@ from theano.configparser import AddConfigVar, BoolParam ...@@ -26,10 +26,6 @@ from theano.configparser import AddConfigVar, BoolParam
_logger = logging.getLogger('theano.gof.opt') _logger = logging.getLogger('theano.gof.opt')
AddConfigVar('time_seq_optimizer',
"Should SeqOptimizer print the time taked by each of its optimizer",
BoolParam(False),
in_c_key=False)
AddConfigVar('time_eq_optimizer', AddConfigVar('time_eq_optimizer',
"Should EquilibriumOptimizer print the time taken by each optimizer", "Should EquilibriumOptimizer print the time taken by each optimizer",
...@@ -180,29 +176,6 @@ class SeqOptimizer(Optimizer, list): ...@@ -180,29 +176,6 @@ class SeqOptimizer(Optimizer, list):
else: else:
raise raise
if config.time_seq_optimizer:
print "SeqOptimizer",
if hasattr(self,"name"): print self.name,
elif hasattr(self,"__name__"): print self.__name__,
print " time %.3fs for %d/%d nodes before/after optimization"%(sum(l),nb_node_before,len(fgraph.apply_nodes))
print " time %.3fs for validate " % (
fgraph.profile.validate_time - validate_before)
ll=[]
for opt in self:
if hasattr(opt,"__name__"):
ll.append((opt.__name__,opt.__class__.__name__))
else:
ll.append((opt.name,opt.__class__.__name__))
lll=zip(l,ll)
def cmp(a,b):
if a[0]==b[0]: return 0
if a[0]<b[0]: return -1
return 1
lll.sort(cmp)
for (t, opt) in lll[::-1]:
print ' %.6fs - %s' % (t, opt)
print
if fgraph.profile: if fgraph.profile:
validate_time = fgraph.profile.validate_time - validate_before validate_time = fgraph.profile.validate_time - validate_before
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论