提交 8b22a79b authored 作者: Frederic's avatar Frederic

Warn the user the ProfileMode is deprecated

上级 9f4e6b56
...@@ -2,6 +2,7 @@ import atexit ...@@ -2,6 +2,7 @@ import atexit
import copy import copy
import os import os
import time import time
import warnings
import theano import theano
from theano.gof.link import WrapLinker from theano.gof.link import WrapLinker
...@@ -98,6 +99,10 @@ class Profile_Maker(FunctionMaker): ...@@ -98,6 +99,10 @@ class Profile_Maker(FunctionMaker):
# Lazy import to avoid compilation when importing theano. # Lazy import to avoid compilation when importing theano.
from theano.gof.cutils import run_cthunk from theano.gof.cutils import run_cthunk
warnings.warn(
"DEPRECATION WARNING: The ProfileMode is deprecated. Use the Theano"
" flags/parameter to theano.function 'profile=True' instead"
" of 'mode=ProfileMode'")
return ret return ret
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论