Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
acdb57a5
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
acdb57a5
编写于
6月 15, 2018
作者:
T
tensor-tang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
polish doc: conv2d
上级
d516ace9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
11 deletion
+15
-11
python/paddle/fluid/layers/nn.py
python/paddle/fluid/layers/nn.py
+15
-11
未找到文件。
python/paddle/fluid/layers/nn.py
浏览文件 @
acdb57a5
...
@@ -1183,14 +1183,17 @@ def conv2d(input,
...
@@ -1183,14 +1183,17 @@ def conv2d(input,
act
=
None
,
act
=
None
,
name
=
None
):
name
=
None
):
"""
"""
**Convlution2D Layer**
The convolution2D layer calculates the output based on the input, filter
The convolution2D layer calculates the output based on the input, filter
and strides, paddings, dilations, groups parameters. Input
(Input)
and
and strides, paddings, dilations, groups parameters. Input and
Output
(Output) are in NCHW format. W
here N is batch size, C is the number of
Output
are in NCHW format, w
here N is batch size, C is the number of
channels, H is the height of the feature, and W is the width of the feature.
channels, H is the height of the feature, and W is the width of the feature.
The details of convolution layer, please refer UFLDL's `convolution,
Filter is in MCHW format, where M is the number of output image channels,
<http://ufldl.stanford.edu/tutorial/supervised/FeatureExtractionUsingConvolution/>`_ .
C is the number of input image channels, H is the height of the filter,
and W is the width of the filter. If the groups is greater than 1,
C will equal the number of input image channels divided by the groups.
Please refer to UFLDL's `convolution
<http://ufldl.stanford.edu/tutorial/supervised/FeatureExtractionUsingConvolution/>`_
for more detials.
If bias attribution and activation type are provided, bias is added to the
If bias attribution and activation type are provided, bias is added to the
output of the convolution, and the corresponding activation function is
output of the convolution, and the corresponding activation function is
applied to the final result.
applied to the final result.
...
@@ -1201,15 +1204,14 @@ def conv2d(input,
...
@@ -1201,15 +1204,14 @@ def conv2d(input,
Out = \sigma (W
\\
ast X + b)
Out = \sigma (W
\\
ast X + b)
In the above equation
:
Where
:
* :math:`X`: Input value, a tensor with NCHW format.
* :math:`X`: Input value, a tensor with NCHW format.
* :math:`W`: Filter value, a tensor with MCHW format.
* :math:`W`: Filter value, a tensor with MCHW format.
* :math:`
\\
ast`: Convolution operation.
* :math:`
\\
ast`: Convolution operation.
* :math:`b`: Bias value, a 2-D tensor with shape [M, 1].
* :math:`b`: Bias value, a 2-D tensor with shape [M, 1].
* :math:`
\\
sigma`: Activation function.
* :math:`
\\
sigma`: Activation function.
* :math:`Out`: Output value, the shape of :math:`Out` and :math:`X` may be
* :math:`Out`: Output value, the shape of :math:`Out` and :math:`X` may be different.
different.
Example:
Example:
...
@@ -1220,6 +1222,7 @@ def conv2d(input,
...
@@ -1220,6 +1222,7 @@ def conv2d(input,
Filter shape: :math:`(C_{out}, C_{in}, H_f, W_f)`
Filter shape: :math:`(C_{out}, C_{in}, H_f, W_f)`
- Output:
- Output:
Output shape: :math:`(N, C_{out}, H_{out}, W_{out})`
Output shape: :math:`(N, C_{out}, H_{out}, W_{out})`
Where
Where
...
@@ -1231,7 +1234,7 @@ def conv2d(input,
...
@@ -1231,7 +1234,7 @@ def conv2d(input,
Args:
Args:
input (Variable): The input image with [N, C, H, W] format.
input (Variable): The input image with [N, C, H, W] format.
num_filters(int): The number of filter. It is as same as the output
num_filters(int): The number of filter. It is as same as the output
image channel.
image channel.
filter_size (int|tuple|None): The filter size. If filter_size is a tuple,
filter_size (int|tuple|None): The filter size. If filter_size is a tuple,
it must contain two integers, (filter_size_H, filter_size_W).
it must contain two integers, (filter_size_H, filter_size_W).
...
@@ -1254,7 +1257,8 @@ def conv2d(input,
...
@@ -1254,7 +1257,8 @@ def conv2d(input,
bias_attr (ParamAttr): Bias parameter for the Conv2d layer. Default: None
bias_attr (ParamAttr): Bias parameter for the Conv2d layer. Default: None
use_cudnn (bool): Use cudnn kernel or not, it is valid only when the cudnn
use_cudnn (bool): Use cudnn kernel or not, it is valid only when the cudnn
library is installed. Default: True
library is installed. Default: True
use_mkldnn (bool): Use mkldnn kernels or not.
use_mkldnn (bool): Use mkldnn kernels or not, it is valid only when compiled
with mkldnn library. Default: False
act (str): Activation type. Default: None
act (str): Activation type. Default: None
name (str|None): A name for this layer(optional). If set None, the layer
name (str|None): A name for this layer(optional). If set None, the layer
will be named automatically.
will be named automatically.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录