python3.4在ubuntu中安装theano

2024-10-06 12:07:58 发布

您现在位置:Python中文网/ 问答频道 /正文

我用内置系统python3.4.3在ubuntu14.04中安装了theano, 安装pip3,用于安装numpy、scipy、theano。我用鼻子来测试上面。在

Numpy和Scipy没有错误,但是ano给出了下面的错误消息。在

ERROR: test_op (theano.sparse.tests.test_basic.SamplingDotTester)
----------------------------------------------------------------------

> Traceback (most recent call last):   File
> "/usr/local/lib/python3.4/dist-packages/theano/sparse/tests/test_basic.py",
> line 3063, in test_op
>     utt.assert_allclose(expected, tested.toarray())   File "/usr/local/lib/python3.4/dist-packages/theano/tests/unittest_tools.py",
> line 343, in assert_allclose
>     if not T.basic._allclose(val1, val2, rtol, atol):   File "/usr/local/lib/python3.4/dist-packages/theano/tensor/basic.py", line
> 496, in _allclose
>     return numpy.allclose(a, b, atol=atol_, rtol=rtol_)   File "/usr/local/lib/python3.4/dist-packages/numpy/core/numeric.py", line
> 2278, in allclose
>     res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan))   File
> "/usr/local/lib/python3.4/dist-packages/numpy/core/numeric.py", line
> 2356, in isclose
>     xfin = isfinite(x) TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any
> supported types according to the casting rule ''safe''

======================================================================
ERROR: test_structured_add_s_v (theano.sparse.tests.test_basic.StructuredAddSVTester)
----------------------------------------------------------------------

> Traceback (most recent call last):   File
> "/usr/local/lib/python3.4/dist-packages/theano/sparse/tests/test_basic.py",
> line 2948, in test_structured_add_s_v
>     out.toarray())   File "/usr/local/lib/python3.4/dist-packages/theano/tests/unittest_tools.py",
> line 343, in assert_allclose
>     if not T.basic._allclose(val1, val2, rtol, atol):   File "/usr/local/lib/python3.4/dist-packages/theano/tensor/basic.py", line
> 496, in _allclose
>     return numpy.allclose(a, b, atol=atol_, rtol=rtol_)   File "/usr/local/lib/python3.4/dist-packages/numpy/core/numeric.py", line
> 2278, in allclose
>     res = all(isclose(a, b, rtol=rtol, atol=atol, equal_nan=equal_nan))   File
> "/usr/local/lib/python3.4/dist-packages/numpy/core/numeric.py", line
> 2356, in isclose
>     xfin = isfinite(x) TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any
> supported types according to the casting rule ''safe''

======================================================================
ERROR: test_perform (theano.tensor.tests.test_slinalg.TestKron)
----------------------------------------------------------------------

> Traceback (most recent call last):   File
> "/usr/local/lib/python3.4/dist-packages/theano/tensor/tests/test_slinalg.py",
> line 310, in test_perform
>     assert numpy.allclose(out, scipy.linalg.kron(a, b))   File "/usr/local/lib/python3.4/dist-packages/scipy/linalg/special_matrices.py",
> line 470, in kron
>     return np.concatenate(np.concatenate(o, axis=1), axis=1) IndexError: axis 1 out of bounds [0, 1)

----------------------------------------------------------------------

我怎样才能修好它?谢谢!在


Tags: inpytestnumpylibpackagesusrlocal