Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
8ac11787
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8ac11787
编写于
11月 06, 2017
作者:
C
chengduoZH
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix doc
上级
17248153
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
40 addition
and
36 deletion
+40
-36
paddle/operators/conv_op.cc
paddle/operators/conv_op.cc
+40
-36
未找到文件。
paddle/operators/conv_op.cc
浏览文件 @
8ac11787
...
@@ -64,42 +64,41 @@ Conv2DOpMaker::Conv2DOpMaker(framework::OpProto* proto,
...
@@ -64,42 +64,41 @@ Conv2DOpMaker::Conv2DOpMaker(framework::OpProto* proto,
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
AddInput
(
"Input"
,
"Input"
,
"(Tensor), the input tensor of convolution operator. "
"(Tensor) The input tensor of convolution operator. "
"The format of input tensor is NCHW. Where N is batch size, C is the "
"The format of input tensor is NCHW, where N is batch size, C is the "
"number of channels, H and W is the height and width of image."
);
"number of channels, H is the height of the feature, "
"and W is the width of the feature."
);
AddInput
(
"Filter"
,
AddInput
(
"Filter"
,
"(Tensor)
, the filter tensor of convolution operator.
"
"(Tensor)
The filter tensor of convolution operator.
"
"The format of the filter tensor is MCHW, where M is the number of "
"The format of the filter tensor is MCHW, where M is the number of "
"output image channels, C is the number of input image channels, "
"output image channels, C is the number of input image channels, "
"H
and W is height and width of
filter. "
"H
is the height of the filter, and W is the width of the
filter. "
"If the groups attribute is greater than 1, C equal the number of "
"If the groups attribute is greater than 1, C equal
s
the number of "
"input image channels divided by the groups."
);
"input image channels divided by the groups."
);
AddOutput
(
"Output"
,
AddOutput
(
"Output"
,
"(Tensor), the output tensor of convolution operator."
"(Tensor) The output tensor of convolution operator. "
"The format of output tensor is also NCHW. Where N is batch size, "
"The format of output tensor is also NCHW."
);
"C is the "
AddAttr
<
std
::
vector
<
int
>>
(
"strides"
,
"strides of convolution operator."
)
"number of channels, H and W is the height and width of image."
);
AddAttr
<
std
::
vector
<
int
>>
(
"strides"
,
"(vector default:{1, 1}), strides of convolution operator."
)
.
SetDefault
({
1
,
1
});
.
SetDefault
({
1
,
1
});
AddAttr
<
std
::
vector
<
int
>>
(
AddAttr
<
std
::
vector
<
int
>>
(
"paddings"
,
"paddings of convolution operator."
)
"paddings"
,
"(vector default:{0, 0}), paddings of convolution operator."
)
.
SetDefault
({
0
,
0
});
.
SetDefault
({
0
,
0
});
AddAttr
<
int
>
(
AddAttr
<
int
>
(
"groups"
,
"groups"
,
"(int
, default:1),
group size of convolution operator. "
"(int
default:1), the
group size of convolution operator. "
"
Refer to grouped convolution in Alex Krizhevsky's
paper: "
"
According to grouped convolution in Alex Krizhevsky's Deep CNN
paper: "
"when group=2, the first half of the filters
are
only connected to the "
"when group=2, the first half of the filters
is
only connected to the "
"first half of the input channels,
and the second half only connected
"
"first half of the input channels,
while the second half of the filters
"
"
to the second half
."
)
"
is only connected to the second half of the input channels
."
)
.
SetDefault
(
1
);
.
SetDefault
(
1
);
AddComment
(
R"DOC(
AddComment
(
R"DOC(
Convolution Operator.
The convolution operation calculates the output based on the input, filter
The convolution operation calculates the output based on the input, filter
and strides, paddings, groups parameters. The size of each dimension of the
and strides, paddings, groups parameters. The size of each dimension of the
parameters is checked in the infer-shape.
parameters is checked in the infer-shape.
Input(Input, Filter) and output(Output) are in NCHW format. Where N is batch
Input(Input, Filter) and output(Output) are in NCHW format. Where N is batch
size, C is the number of channels, H
and W is the height and
size, C is the number of channels, H
is the height of the feature, and W is
width of
feature. Parameters(ksize, strides, paddings) are two elements.
the width of the
feature. Parameters(ksize, strides, paddings) are two elements.
These two elements represent height and width, respectively.
These two elements represent height and width, respectively.
The input(X) size and output(Out) size may be different.
The input(X) size and output(Out) size may be different.
...
@@ -120,19 +119,21 @@ Conv3DOpMaker::Conv3DOpMaker(framework::OpProto* proto,
...
@@ -120,19 +119,21 @@ Conv3DOpMaker::Conv3DOpMaker(framework::OpProto* proto,
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
AddInput
(
"Input"
,
"Input"
,
"(Tensor)
, t
he input tensor of convolution operator. "
"(Tensor)
T
he input tensor of convolution operator. "
"The format of input tensor is NCDHW. Where N is batch size, C is the "
"The format of input tensor is NCDHW. Where N is batch size, C is the "
"number of channels, D, H and W is the depth, height and width of "
"number of channels, D is the depth of the feature, H is the height of "
"image."
);
"the feature, "
"and W is the width of the feature."
);
AddInput
(
"Filter"
,
AddInput
(
"Filter"
,
"(Tensor)
, the filter tensor of convolution operator.
"
"(Tensor)
The filter tensor of convolution operator.
"
"The format of the filter tensor is MCDHW, where M is the number of "
"The format of the filter tensor is MCDHW, where M is the number of "
"output image channels, C is the number of input image channels, "
"output image channels, C is the number of input image channels, "
"D, H and W is depth, height and width of filter. "
"D is the depth of the filter, H is the height of the filter, and W "
"If the groups attribute is greater than 1, C equal the number of "
"is the width of the filter."
"If the groups attribute is greater than 1, C equals the number of "
"input image channels divided by the groups."
);
"input image channels divided by the groups."
);
AddOutput
(
"Output"
,
AddOutput
(
"Output"
,
"(Tensor)
, t
he output tensor of convolution operator."
"(Tensor)
T
he output tensor of convolution operator."
"The format of output tensor is also NCDHW."
);
"The format of output tensor is also NCDHW."
);
AddAttr
<
std
::
vector
<
int
>>
(
AddAttr
<
std
::
vector
<
int
>>
(
"strides"
,
"strides"
,
...
@@ -144,20 +145,23 @@ Conv3DOpMaker::Conv3DOpMaker(framework::OpProto* proto,
...
@@ -144,20 +145,23 @@ Conv3DOpMaker::Conv3DOpMaker(framework::OpProto* proto,
.
SetDefault
({
0
,
0
,
0
});
.
SetDefault
({
0
,
0
,
0
});
AddAttr
<
int
>
(
AddAttr
<
int
>
(
"groups"
,
"groups"
,
"(int
, default:1)
the group size of convolution operator. "
"(int
default:1),
the group size of convolution operator. "
"
Refer to grouped convolution in Alex Krizhevsky's
paper: "
"
According to grouped convolution in Alex Krizhevsky's Deep CNN
paper: "
"when group=2, the first half of the filters
are
only connected to the "
"when group=2, the first half of the filters
is
only connected to the "
"first half of the input channels,
and the second half only connected
"
"first half of the input channels,
while the second half of the filters
"
"
to the second half
."
)
"
is only connected to the second half of the input channels
."
)
.
SetDefault
(
1
);
.
SetDefault
(
1
);
AddComment
(
R"DOC(
AddComment
(
R"DOC(
Convolution3D Operator.
The convolution operation calculates the output based on the input, filter
The convolution operation calculates the output based on the input, filter
and strides, paddings, groups parameters. The size of each dimension of the
and strides, paddings, groups parameters. The size of each dimension of the
parameters is checked in the infer-shape.
parameters is checked in the infer-shape.
Input(Input, Filter) and output(Output) are in NCDHW format. Where N is batch
Input(Input, Filter) and output(Output) are in NCDHW format. Where N is batch
size, C is the number of channels,
D, H and W is the depth, height and
size, C is the number of channels,
D is the depth of the feature, H is the height of
width of feature. Parameters(ksize, strides, paddings) are three elements.
the feature, and W is the width of the feature. Parameters(ksize, strides, paddings)
These three elements represent depth, height and width, respectively.
are three elements.
These three elements represent depth, height and width, respectively.
The input(X) size and output(Out) size may be different.
The input(X) size and output(Out) size may be different.
Example:
Example:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录