提交 8a4ee69c authored 作者: Frederic Bastien's avatar Frederic Bastien

Skip test if no c compiler

上级 f859885d
from __future__ import absolute_import, print_function, division from __future__ import absolute_import, print_function, division
import numpy as np from nose.plugins.skip import SkipTest
from nose.tools import assert_raises from nose.tools import assert_raises
import numpy as np
import theano import theano
from theano import tensor from theano import tensor
...@@ -798,6 +799,9 @@ class Conv_opt_test(unittest.TestCase): ...@@ -798,6 +799,9 @@ class Conv_opt_test(unittest.TestCase):
kshp2d = [(4, 3, 3, 3), (3, 2, 3, 5), (4, 1, 1, 1)] kshp2d = [(4, 3, 3, 3), (3, 2, 3, 5), (4, 1, 1, 1)]
tshp2d = [(2, 4, 3, 3), (2, 3, 3, 3), (2, 4, 3, 3)] tshp2d = [(2, 4, 3, 3), (2, 3, 3, 3), (2, 4, 3, 3)]
if theano.config.cxx == "":
raise SkipTest("Need a c compiler.")
for imshp, kshp, tshp in zip(imshp2d, kshp2d, tshp2d): for imshp, kshp, tshp in zip(imshp2d, kshp2d, tshp2d):
# forward passes # forward passes
self.optimizer_2d([imshp, kshp, tshp], 0, self.optimizer_2d([imshp, kshp, tshp], 0,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论