Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
49ca2e00
提交
49ca2e00
authored
12月 03, 2015
作者:
Pascal Lamblin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3729 from f0k/fix-conv2d-interface
Fix errors in conv2d() -> abstract_conv.conv2d() wrapper
上级
cca20baf
0a2a7ca4
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
11 行删除
+14
-11
__init__.py
theano/tensor/nnet/__init__.py
+14
-11
没有找到文件。
theano/tensor/nnet/__init__.py
浏览文件 @
49ca2e00
...
...
@@ -35,9 +35,9 @@ from .bn import batch_normalization
import
warnings
from
.abstract_conv
import
conv2d
as
abstract_conv2d
def
conv2d
(
input
,
filters
,
input_shape
=
None
,
image_shape
=
None
,
filter_shape
=
None
,
def
conv2d
(
input
,
filters
,
input_shape
=
None
,
filter_shape
=
None
,
border_mode
=
'valid'
,
subsample
=
(
1
,
1
),
filter_flip
=
True
,
**
k
args
):
image_shape
=
None
,
**
kw
args
):
"""
This function will build the symbolic graph for convolving a mini-batch of a
stack of 2D inputs with a set of 2D filters. The implementation is modelled
...
...
@@ -53,9 +53,6 @@ def conv2d(input, filters, input_shape=None, image_shape=None, filter_shape=None
(output channels, input channels, filter rows, filter columns).
See the optional parameter ``filter_shape``.
:type image_shape: None, tuple/list of len 4 of int or Constant variable
:param image_shape Deprecated, use input_shape instead
:type input_shape: None, tuple/list of len 4 of int or Constant variable
:param input_shape: The shape of the input parameter.
Optional, possibly used to choose an optimal implementation.
...
...
@@ -93,21 +90,27 @@ def conv2d(input, filters, input_shape=None, image_shape=None, filter_shape=None
to as a convolution, and this is the default. If ``False``, the filters
are not flipped and the operation is referred to as a cross-correlation.
:type image_shape: None, tuple/list of len 4 of int or Constant variable
:param image_shape Deprecated alias for `input_shape`
:param **kwargs Any other keyword arguments are accepted for backwards
compatibility, but will be ignored.
:rtype: symbolic 4D tensor
:return: set of feature maps generated by convolutional layer. Tensor is
of shape (batch size, output channels, output rows, output columns)
"""
if
len
(
kargs
.
keys
())
>
0
:
warnings
.
warn
(
str
(
kargs
.
keys
())
+
if
len
(
k
w
args
.
keys
())
>
0
:
warnings
.
warn
(
str
(
k
w
args
.
keys
())
+
" are now deprecated in "
"`tensor.nnet.abstract_conv.conv2d` interface"
" and will be ignored."
)
if
image_shape
is
not
None
:
warnings
.
warn
(
"
image_shape is no longer supported in
"
"`tensor.nnet.
abstract_conv.conv2d` interface
"
"
use input_shape instead
."
)
warnings
.
warn
(
"
The `image_shape` keyword argument to
"
"`tensor.nnet.
conv2d` is deprecated, it has been
"
"
renamed to `input_shape`
."
)
if
input_shape
is
None
:
input_shape
=
image_shape
else
:
...
...
@@ -115,6 +118,6 @@ def conv2d(input, filters, input_shape=None, image_shape=None, filter_shape=None
" be provided at the same time."
)
return
abstract_conv2d
(
input
,
filters
,
input_shape
,
filter_shape
,
border_mode
,
subsample
=
(
1
,
1
)
)
border_mode
,
subsample
,
filter_flip
)
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论