Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
c5c02437
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c5c02437
编写于
11月 03, 2017
作者:
K
kexinzhao
提交者:
Yi Wang
11月 03, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polish from concat to conv shift operators (#5347)
* polish from concat to conv_shift op doc * small fix * small fix
上级
45eabb8c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
57 addition
and
45 deletion
+57
-45
paddle/operators/concat_op.cc
paddle/operators/concat_op.cc
+17
-13
paddle/operators/cond_op.cc
paddle/operators/cond_op.cc
+6
-5
paddle/operators/conv2d_op.cc
paddle/operators/conv2d_op.cc
+18
-14
paddle/operators/conv2d_transpose_op.cc
paddle/operators/conv2d_transpose_op.cc
+11
-7
paddle/operators/conv_shift_op.cc
paddle/operators/conv_shift_op.cc
+5
-6
未找到文件。
paddle/operators/concat_op.cc
浏览文件 @
c5c02437
...
@@ -56,20 +56,24 @@ class ConcatOpMaker : public framework::OpProtoAndCheckerMaker {
...
@@ -56,20 +56,24 @@ class ConcatOpMaker : public framework::OpProtoAndCheckerMaker {
public:
public:
ConcatOpMaker
(
framework
::
OpProto
*
proto
,
framework
::
OpAttrChecker
*
op_checker
)
ConcatOpMaker
(
framework
::
OpProto
*
proto
,
framework
::
OpAttrChecker
*
op_checker
)
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
:
OpProtoAndCheckerMaker
(
proto
,
op_checker
)
{
AddInput
(
"X"
,
"the input tensors of concat operator."
).
AsDuplicable
();
AddInput
(
"X"
,
"Input tensors of concat operator."
).
AsDuplicable
();
AddOutput
(
"Out"
,
"the output tensor of concat operator."
);
AddOutput
(
"Out"
,
"Output tensor of concat operator."
);
AddComment
(
R"DOC(
AddAttr
<
int
>
(
"axis"
,
Join the input tensors along with the axis.
"The axis along which the input tensors will be concatenated."
)
Examples:
Input[0] = [[1,2],[3,4]]
Input[1] = [[5,6]]
axis = 0
Output = [[1,2],
[3,4],
[5,6]]
)DOC"
);
AddAttr
<
int
>
(
"axis"
,
"The axis which the inputs will be joined with."
)
.
SetDefault
(
0
);
.
SetDefault
(
0
);
AddComment
(
R"DOC(
Concat Operator.
Concatenate the input tensors along dimension axis.
Examples:
Input[0] = [[1,2],[3,4]]
Input[1] = [[5,6]]
axis = 0
Output = [[1,2],
[3,4],
[5,6]]
)DOC"
);
}
}
};
};
...
...
paddle/operators/cond_op.cc
浏览文件 @
c5c02437
...
@@ -216,11 +216,12 @@ class CondOpProtoAndCheckerMaker : public framework::OpProtoAndCheckerMaker {
...
@@ -216,11 +216,12 @@ class CondOpProtoAndCheckerMaker : public framework::OpProtoAndCheckerMaker {
AddOutput
(
"IndexTensors"
,
"Index Tensors contains indices for true/false"
);
AddOutput
(
"IndexTensors"
,
"Index Tensors contains indices for true/false"
);
AddComment
(
R"DOC(
AddComment
(
R"DOC(
Sample dependent Cond Operator:
Sample Dependent Conditional Operator.
Given Cond[i] as a 1/0 vector to indicate true/false
The equation is:
Given Cond[i] as a 1/0 vector to indicate true/false:
Out[i] = subnet_t[i], if Cond[i] == true
Out[i] = subnet_true[i], if Cond[i] == true
Out[i] = subnet_t[i], if Cond[i] == false
Out[i] = subnet_false[i], if Cond[i] == false
)DOC"
);
)DOC"
);
}
}
};
};
...
...
paddle/operators/conv2d_op.cc
浏览文件 @
c5c02437
...
@@ -56,17 +56,18 @@ Conv2DOpMaker::Conv2DOpMaker(framework::OpProto* proto,
...
@@ -56,17 +56,18 @@ Conv2DOpMaker::Conv2DOpMaker(framework::OpProto* proto,
AddInput
(
AddInput
(
"Input"
,
"Input"
,
"The input tensor of convolution operator. "
"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 image, "
"and W is the width of the image."
);
AddInput
(
"Filter"
,
AddInput
(
"Filter"
,
"The filter tensor of convolution operator."
"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"
,
"The output tensor of convolution operator."
"The output tensor of convolution operator.
"
"The format of output tensor is also NCHW."
);
"The format of output tensor is also NCHW."
);
AddAttr
<
std
::
vector
<
int
>>
(
"strides"
,
"strides of convolution operator."
)
AddAttr
<
std
::
vector
<
int
>>
(
"strides"
,
"strides of convolution operator."
)
.
SetDefault
({
1
,
1
});
.
SetDefault
({
1
,
1
});
...
@@ -74,16 +75,19 @@ Conv2DOpMaker::Conv2DOpMaker(framework::OpProto* proto,
...
@@ -74,16 +75,19 @@ Conv2DOpMaker::Conv2DOpMaker(framework::OpProto* proto,
.
SetDefault
({
0
,
0
});
.
SetDefault
({
0
,
0
});
AddAttr
<
int
>
(
AddAttr
<
int
>
(
"groups"
,
"groups"
,
"
g
roup size of convolution operator. "
"
G
roup 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(
The convolution operation calculates the output based on the input, filter
Convolution Operator.
and strides, paddings, groups parameters. The size of each dimension of the
parameters is checked in the infer-shape.
The convolution operation calculates the output based on the input, filter,
strides, paddings, and groups parameters. The size of each dimension of the
parameters is checked in the infer-shape method.
)DOC"
);
)DOC"
);
}
}
...
...
paddle/operators/conv2d_transpose_op.cc
浏览文件 @
c5c02437
...
@@ -54,15 +54,16 @@ Conv2DTransposeOpMaker::Conv2DTransposeOpMaker(
...
@@ -54,15 +54,16 @@ Conv2DTransposeOpMaker::Conv2DTransposeOpMaker(
AddInput
(
AddInput
(
"Input"
,
"Input"
,
"(Tensor) The input tensor of convolution transpose operator. "
"(Tensor) The input tensor of convolution transpose 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 input channels, H and W is the height and width of image."
);
"number of input channels, H is the height of the image, and "
"W is the width of the image."
);
AddInput
(
"Filter"
,
AddInput
(
"Filter"
,
"(Tensor) The filter tensor of convolution transpose operator."
"(Tensor) The filter tensor of convolution transpose operator."
"The format of the filter tensor is CMHW, where C is the number of "
"The format of the filter tensor is CMHW, where C is the number of "
"output image channels, M is the number of input image channels, "
"output image channels, M 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. "
"We enforce groups number == 1 and padding == 0 in "
"We enforce groups number == 1 and padding == 0 in "
"
convolution transpose S
cenario."
);
"
the convolution transpose s
cenario."
);
AddOutput
(
"Output"
,
AddOutput
(
"Output"
,
"(Tensor) The output tensor of convolution transpose operator."
"(Tensor) The output tensor of convolution transpose operator."
"The format of output tensor is also NCHW."
);
"The format of output tensor is also NCHW."
);
...
@@ -73,9 +74,12 @@ Conv2DTransposeOpMaker::Conv2DTransposeOpMaker(
...
@@ -73,9 +74,12 @@ Conv2DTransposeOpMaker::Conv2DTransposeOpMaker(
"paddings of convolution transpose operator."
)
"paddings of convolution transpose operator."
)
.
SetDefault
({
0
,
0
});
.
SetDefault
({
0
,
0
});
AddComment
(
R"DOC(
AddComment
(
R"DOC(
The convolution transpose operation calculates the output based on the input, filter
Convolution Transpose Operator.
and strides, paddings, groups parameters. The size of each dimension of the
parameters is checked in the infer-shape.
The convolution transpose operation calculates the output based on the input,
filter, strides, paddings, and groups parameters. The size of each dimension
of the parameters is checked in the infer-shape method.
)DOC"
);
)DOC"
);
}
}
...
...
paddle/operators/conv_shift_op.cc
浏览文件 @
c5c02437
...
@@ -96,14 +96,13 @@ as used in the Neural Turing Machine: https://arxiv.org/abs/1410.5401
...
@@ -96,14 +96,13 @@ as used in the Neural Turing Machine: https://arxiv.org/abs/1410.5401
The equation is:
The equation is:
\f[
$$Out[i] = \sum_{j=-(N-1)/2}^{(N-1)/2} X_{i+j} * Y_{j}$$
Out[i] = \sum_{j=-(N-1)/2}^{(N-1)/2} X_{i+j} * Y_{j}
\f]
where X's index is computed modulo M, and b's index is computed modulo N.
where X's index is computed modulo M, and Y's index is computed modulo N.
Both inputs X and Y can carry LoD (Level of Details) information.
However, the output only shares the LoD information with input X.
Both of the input `X` and `Y` can carry LoD (Level of Details) information.
However, the output only shares the LoD information with input `X`.
)DOC"
);
)DOC"
);
}
}
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录