提交 7238b4f7 authored 作者: Mohammad Pezeshki's avatar Mohammad Pezeshki

test function is moved to another function

上级 3b4ccf8b
......@@ -91,13 +91,15 @@ from theano.gradient import Rop, Lop, grad, subgraph_grad
# This need to be before the init of GPU, as it add config variable
# needed during that phase.
import theano.tests
if hasattr(theano.tests, "TheanoNoseTester"):
test = theano.tests.TheanoNoseTester().test
else:
def test():
raise ImportError("The nose module is not installed."
" It is needed for Theano tests.")
def test(*args):
import theano.tests
if hasattr(theano.tests, "TheanoNoseTester"):
test = theano.tests.TheanoNoseTester().test
test(*args)
else:
raise ImportError("The nose module is not installed.")
if config.device.startswith('gpu') or config.init_gpu_device.startswith('gpu'):
import theano.sandbox.cuda
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论