提交 127ae529 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #5715 from nouiz/warning

Remove useless warning when the profile was manually disabled
...@@ -1481,7 +1481,8 @@ class FunctionMaker(object): ...@@ -1481,7 +1481,8 @@ class FunctionMaker(object):
if theano.config.profile_optimizer: if theano.config.profile_optimizer:
profile.optimizer_profile = (optimizer, profile.optimizer_profile = (optimizer,
optimizer_profile) optimizer_profile)
elif theano.config.profile_optimizer: # IF False, if mean the profile for that function was explicitly disabled
elif theano.config.profile_optimizer and profile is not False:
warnings.warn(( warnings.warn((
"config.profile_optimizer requires config.profile to " "config.profile_optimizer requires config.profile to "
" be set to True as well"), stacklevel=3) " be set to True as well"), stacklevel=3)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论