Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
e722f71f
提交
e722f71f
authored
8月 31, 2016
作者:
Gijs van Tulder
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Convert docstrings for pooling tests to normal comments.
The unittest framework printed the docstrings instead of the function name, but this was not very helpful in identifying the tests.
上级
bd7bfba9
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
11 行删除
+11
-11
test_pool.py
theano/tensor/signal/tests/test_pool.py
+11
-11
没有找到文件。
theano/tensor/signal/tests/test_pool.py
浏览文件 @
e722f71f
...
@@ -360,7 +360,7 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
...
@@ -360,7 +360,7 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt
.
verify_grad
(
mp
,
[
imval
],
rng
=
rng
)
utt
.
verify_grad
(
mp
,
[
imval
],
rng
=
rng
)
def
test_DownsampleFactorMax_grad_st
(
self
):
def
test_DownsampleFactorMax_grad_st
(
self
):
"""checks the gradient for the case that stride is used"""
# checks the gradient for the case that stride is used
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
maxpoolshps
=
((
1
,
1
),
(
3
,
3
),
(
5
,
3
))
maxpoolshps
=
((
1
,
1
),
(
3
,
3
),
(
5
,
3
))
stridesizes
=
((
1
,
1
),
(
3
,
3
),
(
5
,
7
))
stridesizes
=
((
1
,
1
),
(
3
,
3
),
(
5
,
7
))
...
@@ -379,8 +379,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
...
@@ -379,8 +379,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt
.
verify_grad
(
mp
,
[
imval
],
rng
=
rng
)
utt
.
verify_grad
(
mp
,
[
imval
],
rng
=
rng
)
def
test_DownsampleFactorMax_grad_st_extra
(
self
):
def
test_DownsampleFactorMax_grad_st_extra
(
self
):
"""
checks the gradient for the case
#
checks the gradient for the case
that stride is used for extra examples"""
# that stride is used for extra examples
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
maxpoolshps
=
((
5
,
3
),
(
5
,
3
),
(
5
,
3
),
(
5
,
5
),
(
3
,
2
),
(
7
,
7
),
(
9
,
9
))
maxpoolshps
=
((
5
,
3
),
(
5
,
3
),
(
5
,
3
),
(
5
,
5
),
(
3
,
2
),
(
7
,
7
),
(
9
,
9
))
stridesizes
=
((
3
,
2
),
(
7
,
5
),
(
10
,
6
),
(
1
,
1
),
stridesizes
=
((
3
,
2
),
(
7
,
5
),
(
10
,
6
),
(
1
,
1
),
...
@@ -446,8 +446,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
...
@@ -446,8 +446,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt
.
verify_grad
(
mp
,
[
imval
,
grad_val
],
rng
=
rng
)
utt
.
verify_grad
(
mp
,
[
imval
,
grad_val
],
rng
=
rng
)
def
test_DownsampleFactorMaxGrad_grad_st
(
self
):
def
test_DownsampleFactorMaxGrad_grad_st
(
self
):
"""
checks the gradient of the gradient for
#
checks the gradient of the gradient for
the case that stride is used"""
# the case that stride is used
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
maxpoolshps
=
((
1
,
1
),
(
3
,
3
),
(
5
,
3
))
maxpoolshps
=
((
1
,
1
),
(
3
,
3
),
(
5
,
3
))
stridesizes
=
((
1
,
1
),
(
3
,
3
),
(
5
,
7
))
stridesizes
=
((
1
,
1
),
(
3
,
3
),
(
5
,
7
))
...
@@ -470,8 +470,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
...
@@ -470,8 +470,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt
.
verify_grad
(
mp
,
[
imval
,
grad_val
],
rng
=
rng
)
utt
.
verify_grad
(
mp
,
[
imval
,
grad_val
],
rng
=
rng
)
def
test_AveragePoolGrad_grad_st
(
self
):
def
test_AveragePoolGrad_grad_st
(
self
):
"""
checks the gradient of the gradient for
#
checks the gradient of the gradient for
the case that stride is used"""
# the case that stride is used
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
avgpoolshps
=
((
1
,
1
),
(
3
,
3
),
(
5
,
3
))
avgpoolshps
=
((
1
,
1
),
(
3
,
3
),
(
5
,
3
))
stridesizes
=
((
1
,
1
),
(
3
,
3
),
(
5
,
7
))
stridesizes
=
((
1
,
1
),
(
3
,
3
),
(
5
,
7
))
...
@@ -494,8 +494,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
...
@@ -494,8 +494,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt
.
verify_grad
(
mp
,
[
imval
,
grad_val
],
rng
=
rng
)
utt
.
verify_grad
(
mp
,
[
imval
,
grad_val
],
rng
=
rng
)
def
test_DownsampleFactorMaxGrad_grad_st_extra
(
self
):
def
test_DownsampleFactorMaxGrad_grad_st_extra
(
self
):
"""
checks the gradient of the gradient for the case that
#
checks the gradient of the gradient for the case that
stride is used for extra examples"""
# stride is used for extra examples
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
maxpoolshps
=
((
5
,
3
),
(
5
,
3
),
(
5
,
3
),
(
5
,
5
),
(
3
,
2
),
(
7
,
7
),
(
9
,
9
))
maxpoolshps
=
((
5
,
3
),
(
5
,
3
),
(
5
,
3
),
(
5
,
5
),
(
3
,
2
),
(
7
,
7
),
(
9
,
9
))
stridesizes
=
((
3
,
2
),
(
7
,
5
),
(
10
,
6
),
(
1
,
1
),
stridesizes
=
((
3
,
2
),
(
7
,
5
),
(
10
,
6
),
(
1
,
1
),
...
@@ -526,8 +526,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
...
@@ -526,8 +526,8 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt
.
verify_grad
(
mp
,
[
imval
,
grad_val
],
rng
=
rng
)
utt
.
verify_grad
(
mp
,
[
imval
,
grad_val
],
rng
=
rng
)
def
test_AveragePoolGrad_grad_st_extra
(
self
):
def
test_AveragePoolGrad_grad_st_extra
(
self
):
"""
checks the gradient of the gradient for the case that
#
checks the gradient of the gradient for the case that
stride is used for extra examples"""
# stride is used for extra examples
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
rng
=
numpy
.
random
.
RandomState
(
utt
.
fetch_seed
())
avgpoolshps
=
((
5
,
3
),
(
5
,
3
),
(
5
,
3
),
(
5
,
5
),
(
3
,
2
),
(
7
,
7
),
(
9
,
9
))
avgpoolshps
=
((
5
,
3
),
(
5
,
3
),
(
5
,
3
),
(
5
,
5
),
(
3
,
2
),
(
7
,
7
),
(
9
,
9
))
stridesizes
=
((
3
,
2
),
(
7
,
5
),
(
10
,
6
),
(
1
,
1
),
stridesizes
=
((
3
,
2
),
(
7
,
5
),
(
10
,
6
),
(
1
,
1
),
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论