提交 3b337668 authored 作者: Faruk Ahmed's avatar Faruk Ahmed

update global var

上级 05b84df9
...@@ -19,6 +19,7 @@ from theano import config, gof ...@@ -19,6 +19,7 @@ from theano import config, gof
from theano.compat import izip from theano.compat import izip
from theano.gof import graph from theano.gof import graph
import theano.compile.mode import theano.compile.mode
import theano.compile.profiling
from theano.compile.io import ( from theano.compile.io import (
In, SymbolicInput, SymbolicOutput) In, SymbolicInput, SymbolicOutput)
from theano.compile.ops import deep_copy_op, view_op from theano.compile.ops import deep_copy_op, view_op
...@@ -937,11 +938,11 @@ class Function(object): ...@@ -937,11 +938,11 @@ class Function(object):
# #
dt_call = time.time() - t0 dt_call = time.time() - t0
theano.compile.profiling.total_fct_exec_time += dt_call
self.maker.mode.call_time += dt_call self.maker.mode.call_time += dt_call
if profile: if profile:
profile.fct_callcount += 1 profile.fct_callcount += 1
profile.fct_call_time += dt_call profile.fct_call_time += dt_call
profile.total_fct_exec_time += dt_call
if hasattr(self.fn, 'update_profile'): if hasattr(self.fn, 'update_profile'):
self.fn.update_profile(profile) self.fn.update_profile(profile)
if profile.ignore_first_call: if profile.ignore_first_call:
...@@ -1467,9 +1468,9 @@ class FunctionMaker(object): ...@@ -1467,9 +1468,9 @@ class FunctionMaker(object):
end_optimizer = time.time() end_optimizer = time.time()
opt_time = end_optimizer - start_optimizer opt_time = end_optimizer - start_optimizer
theano.compile.profiling.total_graph_opt_time += opt_time
if profile: if profile:
profile.optimizer_time += opt_time profile.optimizer_time += opt_time
profile.total_graph_opt_time += opt_time
if theano.config.profile_optimizer: if theano.config.profile_optimizer:
profile.optimizer_profile = (optimizer, profile.optimizer_profile = (optimizer,
optimizer_profile) optimizer_profile)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论