提交 a3f7b08d authored 作者: Frederic Bastien's avatar Frederic Bastien

Disable test when no gpu are available.

上级 ae73ad8a
...@@ -229,6 +229,11 @@ class T_Scan(unittest.TestCase): ...@@ -229,6 +229,11 @@ class T_Scan(unittest.TestCase):
# as test_one_sequence_one_output_weights, but on the gpu # as test_one_sequence_one_output_weights, but on the gpu
# This first version test the first case in the optimizer to the gpu. # This first version test the first case in the optimizer to the gpu.
def test_one_sequence_one_output_weights_gpu1(self): def test_one_sequence_one_output_weights_gpu1(self):
from nose.plugins.skip import SkipTest
import theano.sandbox.cuda as cuda
if cuda.cuda_available == False:
raise SkipTest('Optional package cuda disabled')
def f_rnn(u_t,x_tm1,W_in, W): def f_rnn(u_t,x_tm1,W_in, W):
return u_t*W_in+x_tm1*W return u_t*W_in+x_tm1*W
...@@ -297,6 +302,11 @@ class T_Scan(unittest.TestCase): ...@@ -297,6 +302,11 @@ class T_Scan(unittest.TestCase):
# This second version test the second case in the optimizer to the gpu. # This second version test the second case in the optimizer to the gpu.
def test_one_sequence_one_output_weights_gpu2(self): def test_one_sequence_one_output_weights_gpu2(self):
from nose.plugins.skip import SkipTest
import theano.sandbox.cuda as cuda
if cuda.cuda_available == False:
raise SkipTest('Optional package cuda disabled')
def f_rnn(u_t,x_tm1,W_in, W): def f_rnn(u_t,x_tm1,W_in, W):
return u_t*W_in+x_tm1*W return u_t*W_in+x_tm1*W
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论