Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
51831978
提交
51831978
authored
5月 22, 2014
作者:
Guillaume Alain
提交者:
Arnaud Bergeron
5月 23, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Renamed a variable because I gave it a ridiculously long name.
上级
b0e830ff
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
+5
-5
fftconv.py
theano/sandbox/cuda/fftconv.py
+5
-5
没有找到文件。
theano/sandbox/cuda/fftconv.py
浏览文件 @
51831978
...
@@ -370,7 +370,7 @@ def mult_and_reduce(input_fft_v, filters_fft_v, input_shape=None,
...
@@ -370,7 +370,7 @@ def mult_and_reduce(input_fft_v, filters_fft_v, input_shape=None,
def
conv2d_fft
(
input
,
filters
,
image_shape
=
None
,
filter_shape
=
None
,
def
conv2d_fft
(
input
,
filters
,
image_shape
=
None
,
filter_shape
=
None
,
border_mode
=
'valid'
,
want_padding_on_last_input_dimension
=
False
):
border_mode
=
'valid'
,
pad_last_dim
=
False
):
"""
"""
expects bc01 input
expects bc01 input
performs a valid/full convolution
performs a valid/full convolution
...
@@ -380,10 +380,10 @@ def conv2d_fft(input, filters, image_shape=None, filter_shape=None,
...
@@ -380,10 +380,10 @@ def conv2d_fft(input, filters, image_shape=None, filter_shape=None,
border_mode: 'valid' of 'full'
border_mode: 'valid' of 'full'
want_padding_on_last_input_dimension
: This code does not support
pad_last_dim
: This code does not support
images for which the last dimension (the "width") is odd. To support
images for which the last dimension (the "width") is odd. To support
this, you can either pad your images on your own, or call this function
this, you can either pad your images on your own, or call this function
with the `
want_padding_on_last_input_dimension
` flag set to `True`.
with the `
pad_last_dim
` flag set to `True`.
This introduces an extra copying step and consumes memory.
This introduces an extra copying step and consumes memory.
The return value will still be of the appropriate shape because
The return value will still be of the appropriate shape because
the padding is trimmed right before the output is returned.
the padding is trimmed right before the output is returned.
...
@@ -404,7 +404,7 @@ def conv2d_fft(input, filters, image_shape=None, filter_shape=None,
...
@@ -404,7 +404,7 @@ def conv2d_fft(input, filters, image_shape=None, filter_shape=None,
# pad filters/image to output shape
# pad filters/image to output shape
if
border_mode
==
'valid'
:
if
border_mode
==
'valid'
:
o0
=
i0
o0
=
i0
if
want_padding_on_last_input_dimension
:
if
pad_last_dim
:
o1
=
i1
+
1
o1
=
i1
+
1
input_padded
=
T
.
zeros
((
b
,
ic
,
o0
,
o1
),
dtype
=
'float32'
)
input_padded
=
T
.
zeros
((
b
,
ic
,
o0
,
o1
),
dtype
=
'float32'
)
input_padded
=
T
.
set_subtensor
(
input_padded
[:,
:,
:
i0
,
:
i1
],
input_padded
=
T
.
set_subtensor
(
input_padded
[:,
:,
:
i0
,
:
i1
],
...
@@ -459,7 +459,7 @@ def conv2d_fft(input, filters, image_shape=None, filter_shape=None,
...
@@ -459,7 +459,7 @@ def conv2d_fft(input, filters, image_shape=None, filter_shape=None,
# slice because the convolution was circular, we need it to be valid
# slice because the convolution was circular, we need it to be valid
if
border_mode
==
'valid'
:
if
border_mode
==
'valid'
:
if
want_padding_on_last_input_dimension
:
if
pad_last_dim
:
output
=
output_circ
[:,
:,
f0
-
1
:,
f1
-
1
:(
o1
-
1
)]
output
=
output_circ
[:,
:,
f0
-
1
:,
f1
-
1
:(
o1
-
1
)]
else
:
else
:
output
=
output_circ
[:,
:,
f0
-
1
:,
f1
-
1
:
o1
]
output
=
output_circ
[:,
:,
f0
-
1
:,
f1
-
1
:
o1
]
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论