Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
1960ddab
提交
1960ddab
authored
7月 18, 2016
作者:
Cesar Laurent
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed downsample.py
上级
589fc4b0
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
1 行增加
和
56 行删除
+1
-56
Theano.pyproj
Theano.pyproj
+1
-1
index.txt
doc/library/tensor/signal/index.txt
+0
-1
downsample.py
theano/tensor/signal/downsample.py
+0
-26
test_pool.py
theano/tensor/signal/tests/test_pool.py
+0
-28
没有找到文件。
Theano.pyproj
浏览文件 @
1960ddab
...
...
@@ -187,7 +187,7 @@
<Compile
Include=
"theano\tensor\sharedvar.py"
/>
<Compile
Include=
"theano\tensor\shared_randomstreams.py"
/>
<Compile
Include=
"theano\tensor\signal\conv.py"
/>
<Compile
Include=
"theano\tensor\signal\
downsample
.py"
/>
<Compile
Include=
"theano\tensor\signal\
pool
.py"
/>
<Compile
Include=
"theano\tensor\signal\__init__.py"
/>
<Compile
Include=
"theano\tensor\tensor_grad.py"
/>
<Compile
Include=
"theano\tensor\xlogx.py"
/>
...
...
doc/library/tensor/signal/index.txt
浏览文件 @
1960ddab
...
...
@@ -20,5 +20,4 @@ forms of signal processing.
:maxdepth: 1
conv
downsample
pool
theano/tensor/signal/downsample.py
deleted
100644 → 0
浏览文件 @
589fc4b0
from
__future__
import
absolute_import
,
print_function
,
division
from
.
import
pool
import
warnings
warnings
.
warn
(
"downsample module has been moved to the theano.tensor.signal.pool module."
)
max_pool_2d_same_size
=
pool
.
max_pool_2d_same_size
max_pool_2d
=
pool
.
pool_2d
DownsampleFactorMax
=
pool
.
Pool
PoolGrad
=
pool
.
PoolGrad
MaxPoolGrad
=
pool
.
MaxPoolGrad
AveragePoolGrad
=
pool
.
AveragePoolGrad
# This is for compatibility with pickled things. It should go away at
# some point.
class
DownsampleFactorMaxGrad
(
object
):
def
__new__
(
self
,
ds
,
ignore_border
,
st
=
None
,
padding
=
(
0
,
0
),
mode
=
'max'
):
if
mode
==
'max'
:
return
MaxPoolGrad
(
ds
=
ds
,
ignore_border
=
ignore_border
,
st
=
st
,
padding
=
padding
)
else
:
return
AveragePoolGrad
(
ds
=
ds
,
ignore_border
=
ignore_border
,
st
=
st
,
padding
=
padding
,
mode
=
mode
)
DownsampleFactorMaxGradGrad
=
pool
.
DownsampleFactorMaxGradGrad
theano/tensor/signal/tests/test_pool.py
浏览文件 @
1960ddab
...
...
@@ -17,8 +17,6 @@ from theano.tensor.signal.pool import (Pool, pool_2d,
max_pool_2d_same_size
,
DownsampleFactorMaxGradGrad
)
from
theano.tensor.signal.downsample
import
DownsampleFactorMaxGrad
from
theano
import
function
...
...
@@ -876,31 +874,5 @@ class TestDownsampleFactorMax(utt.InferShapeTester):
utt
.
assert_allclose
(
o
,
n
)
def
test_DownsampleFactorMaxGrad
(
self
):
im
=
theano
.
tensor
.
tensor4
()
maxout
=
theano
.
tensor
.
tensor4
()
grad
=
theano
.
tensor
.
tensor4
()
for
mode
in
[
'max'
,
'sum'
,
'average_inc_pad'
,
'average_exc_pad'
]:
f
=
theano
.
function
([
im
,
maxout
,
grad
],
DownsampleFactorMaxGrad
(
ignore_border
=
False
,
mode
=
mode
)(
im
,
maxout
,
grad
,
(
3
,
3
)),
on_unused_input
=
'ignore'
)
if
mode
==
'max'
:
assert
any
(
isinstance
(
n
.
op
,
MaxPoolGrad
)
for
n
in
f
.
maker
.
fgraph
.
toposort
())
assert
not
any
(
isinstance
(
n
.
op
,
AveragePoolGrad
)
for
n
in
f
.
maker
.
fgraph
.
toposort
())
else
:
assert
not
any
(
isinstance
(
n
.
op
,
MaxPoolGrad
)
for
n
in
f
.
maker
.
fgraph
.
toposort
())
assert
any
(
isinstance
(
n
.
op
,
AveragePoolGrad
)
for
n
in
f
.
maker
.
fgraph
.
toposort
())
if
__name__
==
'__main__'
:
unittest
.
main
()
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论