提交 996fc67f authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Skip test if GPU not available

上级 206008e7
......@@ -4,6 +4,12 @@ import theano
from theano import tensor
from theano.sandbox import cuda
# Skip test if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest
import theano.sandbox.cuda as cuda_ndarray
if cuda_ndarray.cuda_available == False:
raise SkipTest('Optional package cuda disabled')
class TestGradient(unittest.TestCase):
verbose = 0
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论