Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
63a59ac1
提交
63a59ac1
authored
12月 06, 2011
作者:
nouiz
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #275 from delallea/win_py24
More fixes for Windows
上级
2b571a86
0a391daa
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
38 行增加
和
16 行删除
+38
-16
install.txt
doc/install.txt
+8
-1
test_basic.py
theano/sparse/tests/test_basic.py
+8
-2
test_basic.py
theano/tensor/tests/test_basic.py
+22
-13
没有找到文件。
doc/install.txt
浏览文件 @
63a59ac1
...
@@ -726,7 +726,7 @@ Currently, due to memory fragmentation issue in Windows, the
...
@@ -726,7 +726,7 @@ Currently, due to memory fragmentation issue in Windows, the
test-suite breaks at some point when using ``nosetests``, with many error
test-suite breaks at some point when using ``nosetests``, with many error
messages looking
messages looking
like: ``DLL load failed: Not enough storage is available to process this
like: ``DLL load failed: Not enough storage is available to process this
command``. As a
result, you should instead run
command``. As a
workaround, you can instead run:
.. code-block:: bash
.. code-block:: bash
...
@@ -736,6 +736,13 @@ This will run tests in batches of 100, which should avoid memory errors.
...
@@ -736,6 +736,13 @@ This will run tests in batches of 100, which should avoid memory errors.
Note that this script calls ``nosetests``, which may require being run from
Note that this script calls ``nosetests``, which may require being run from
within a MinGW shell if you installed Nose manually as described above.
within a MinGW shell if you installed Nose manually as described above.
.. note::
The above workaround to run tests with the ``run_tests_in_batch.py`` script
is currently imperfect: some tests are not properly collected by nosetests
in this mode. This may result in some weird test failures starting with
``ERROR: Failure: OSError``. We do not yet have a fix for this problem.
Editing code in Visual Studio
Editing code in Visual Studio
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
theano/sparse/tests/test_basic.py
浏览文件 @
63a59ac1
...
@@ -555,8 +555,14 @@ class test_structureddot(unittest.TestCase):
...
@@ -555,8 +555,14 @@ class test_structureddot(unittest.TestCase):
class
DotTests
(
unittest
.
TestCase
):
class
DotTests
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
x_size
=
(
10
,
1000
)
# On 32-bit platforms we use smaller matrices to avoid running out of
y_size
=
(
1000
,
10000
)
# memory during tests.
if
theano
.
gof
.
cmodule
.
local_bitwidth
()
<=
32
:
x_size
=
(
10
,
100
)
y_size
=
(
100
,
1000
)
else
:
x_size
=
(
10
,
1000
)
y_size
=
(
1000
,
10000
)
self
.
x_csr
=
scipy
.
sparse
.
csr_matrix
(
self
.
x_csr
=
scipy
.
sparse
.
csr_matrix
(
numpy
.
random
.
binomial
(
1
,
0.5
,
x_size
),
dtype
=
theano
.
config
.
floatX
)
numpy
.
random
.
binomial
(
1
,
0.5
,
x_size
),
dtype
=
theano
.
config
.
floatX
)
...
...
theano/tensor/tests/test_basic.py
浏览文件 @
63a59ac1
...
@@ -372,7 +372,8 @@ def rand_of_dtype(shape, dtype):
...
@@ -372,7 +372,8 @@ def rand_of_dtype(shape, dtype):
def
makeBroadcastTester
(
op
,
expected
,
checks
=
{},
name
=
None
,
**
kwargs
):
def
makeBroadcastTester
(
op
,
expected
,
checks
=
{},
name
=
None
,
**
kwargs
):
name
=
str
(
op
)
if
name
is
None
:
name
=
str
(
op
)
# Here we ensure the test name matches the name of the variable defined in
# Here we ensure the test name matches the name of the variable defined in
# this script. This is needed to properly identify the test e.g. with the
# this script. This is needed to properly identify the test e.g. with the
# --with-id option of nosetests, or simply to rerun a specific test that
# --with-id option of nosetests, or simply to rerun a specific test that
...
@@ -628,6 +629,7 @@ CeilIntDivTester = makeBroadcastTester(
...
@@ -628,6 +629,7 @@ CeilIntDivTester = makeBroadcastTester(
uinteger
=
(
randint
(
2
,
3
)
.
astype
(
"uint8"
),
uinteger
=
(
randint
(
2
,
3
)
.
astype
(
"uint8"
),
randint_nonzero
(
2
,
3
)
.
astype
(
"uint8"
)),
randint_nonzero
(
2
,
3
)
.
astype
(
"uint8"
)),
),
),
name
=
'CeilIntDiv'
,
# As we implement this function with neq, the gradient returned is always 0.
# As we implement this function with neq, the gradient returned is always 0.
# grad=_grad_broadcast_div_mod_normal,
# grad=_grad_broadcast_div_mod_normal,
# grad_rtol=div_grad_rtol,
# grad_rtol=div_grad_rtol,
...
@@ -674,10 +676,13 @@ _grad_broadcast_pow_normal = dict(same_shapes = (rand_ranged(1, 5, (2, 3)), rand
...
@@ -674,10 +676,13 @@ _grad_broadcast_pow_normal = dict(same_shapes = (rand_ranged(1, 5, (2, 3)), rand
_good_broadcast_pow_normal_float_pow
=
copy
(
_good_broadcast_pow_normal_float
)
_good_broadcast_pow_normal_float_pow
=
copy
(
_good_broadcast_pow_normal_float
)
del
_good_broadcast_pow_normal_float_pow
[
"empty2"
]
del
_good_broadcast_pow_normal_float_pow
[
"empty2"
]
PowTester
=
makeBroadcastTester
(
op
=
pow
,
PowTester
=
makeBroadcastTester
(
expected
=
lambda
x
,
y
:
check_floatX
((
x
,
y
),
x
**
y
),
op
=
pow
,
good
=
_good_broadcast_pow_normal_float
,
expected
=
lambda
x
,
y
:
check_floatX
((
x
,
y
),
x
**
y
),
grad
=
_grad_broadcast_pow_normal
)
good
=
_good_broadcast_pow_normal_float
,
grad
=
_grad_broadcast_pow_normal
,
name
=
'Pow'
)
PowInplaceTester
=
makeBroadcastTester
(
op
=
inplace
.
pow_inplace
,
PowInplaceTester
=
makeBroadcastTester
(
op
=
inplace
.
pow_inplace
,
expected
=
lambda
x
,
y
:
x
**
y
,
expected
=
lambda
x
,
y
:
x
**
y
,
good
=
_good_broadcast_pow_normal_float_pow
,
good
=
_good_broadcast_pow_normal_float_pow
,
...
@@ -1090,15 +1095,19 @@ ErfcInplaceTester = makeBroadcastTester(op = inplace.erfc_inplace,
...
@@ -1090,15 +1095,19 @@ ErfcInplaceTester = makeBroadcastTester(op = inplace.erfc_inplace,
inplace
=
True
,
inplace
=
True
,
skip
=
skip_scipy
)
skip
=
skip_scipy
)
ZerosLikeTester
=
makeBroadcastTester
(
op
=
tensor
.
zeros_like
,
ZerosLikeTester
=
makeBroadcastTester
(
expected
=
numpy
.
zeros_like
,
op
=
tensor
.
zeros_like
,
good
=
_good_broadcast_unary_normal
,
expected
=
numpy
.
zeros_like
,
grad
=
_grad_broadcast_unary_normal
)
good
=
_good_broadcast_unary_normal
,
grad
=
_grad_broadcast_unary_normal
,
name
=
'ZerosLike'
)
OnesLikeTester
=
makeBroadcastTester
(
op
=
tensor
.
ones_like
,
OnesLikeTester
=
makeBroadcastTester
(
expected
=
numpy
.
ones_like
,
op
=
tensor
.
ones_like
,
good
=
_good_broadcast_unary_normal
,
expected
=
numpy
.
ones_like
,
grad
=
_grad_broadcast_unary_normal
)
good
=
_good_broadcast_unary_normal
,
grad
=
_grad_broadcast_unary_normal
,
name
=
'OnesLike'
)
DotTester
=
makeTester
(
name
=
'DotTester'
,
DotTester
=
makeTester
(
name
=
'DotTester'
,
op
=
dot
,
op
=
dot
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论