提交 c6cafd0d authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

use unittest_tools.assert_allclose() instead of numpy.testing.assert_allclose()

上级 bb53388a
...@@ -2,6 +2,7 @@ import unittest ...@@ -2,6 +2,7 @@ import unittest
import numpy import numpy
import theano import theano
from theano import unittest_tools as utt
# Skip tests if cuda_ndarray is not available. # Skip tests if cuda_ndarray is not available.
from nose.plugins.skip import SkipTest from nose.plugins.skip import SkipTest
...@@ -44,7 +45,7 @@ def TestConv2dFFT(unittest.TestCase): ...@@ -44,7 +45,7 @@ def TestConv2dFFT(unittest.TestCase):
res_ref = f_ref() res_ref = f_ref()
res_fft = f_fft() res_fft = f_fft()
numpy.testing.assert_allclose(res_ref, res_fft) utt.assert_allclose(res_ref, res_fft)
def test_valid(self): def test_valid(self):
self.run_conv(inputs_shape=(5, 3, 7, 6), self.run_conv(inputs_shape=(5, 3, 7, 6),
...@@ -85,4 +86,4 @@ def TestConv2dFFT(unittest.TestCase): ...@@ -85,4 +86,4 @@ def TestConv2dFFT(unittest.TestCase):
res_ref = f_ref() res_ref = f_ref()
res_fft = f_fft() res_fft = f_fft()
numpy.testing.assert_allclose(res_ref, res_fft) utt.assert_allclose(res_ref, res_fft)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论