Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
32d7e618
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
32d7e618
编写于
9月 04, 2017
作者:
H
hedaoyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix some bugs.
上级
1a615b48
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
48 addition
and
24 deletion
+48
-24
paddle/operators/math/im2col.cc
paddle/operators/math/im2col.cc
+24
-12
paddle/operators/math/im2col.cu
paddle/operators/math/im2col.cu
+24
-12
未找到文件。
paddle/operators/math/im2col.cc
浏览文件 @
32d7e618
...
...
@@ -24,7 +24,8 @@ namespace math {
* [input_channels, filter_height, filter_width, output_height, output_width]
*/
template
<
class
T
>
class
Im2ColFunctor
<
kCFO
,
platform
::
CPUPlace
,
T
>
{
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
CPUPlace
,
T
>
{
public:
void
operator
()(
const
framework
::
Tensor
&
im
,
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
...
...
@@ -75,7 +76,8 @@ class Im2ColFunctor<kCFO, platform::CPUPlace, T> {
* [input_channels, filter_height, filter_width, output_height, output_width]
*/
template
<
class
T
>
class
Col2ImFunctor
<
kCFO
,
platform
::
CPUPlace
,
T
>
{
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
CPUPlace
,
T
>
{
public:
void
operator
()(
framework
::
Tensor
&
im
,
const
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
...
...
@@ -117,10 +119,14 @@ class Col2ImFunctor<kCFO, platform::CPUPlace, T> {
}
};
template
class
Im2ColFunctor
<
kCFO
,
platform
::
CPUPlace
,
float
>;
template
class
Im2ColFunctor
<
kCFO
,
platform
::
CPUPlace
,
double
>;
template
class
Col2ImFunctor
<
kCFO
,
platform
::
CPUPlace
,
float
>;
template
class
Col2ImFunctor
<
kCFO
,
platform
::
CPUPlace
,
double
>;
template
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
CPUPlace
,
float
>;
template
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
CPUPlace
,
double
>;
template
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
CPUPlace
,
float
>;
template
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
CPUPlace
,
double
>;
/*
* im = [input_channels, input_height, input_width]
...
...
@@ -128,7 +134,8 @@ template class Col2ImFunctor<kCFO, platform::CPUPlace, double>;
* [output_height, output_width, input_channels, filter_height, filter_width]
*/
template
<
class
T
>
class
Im2ColFunctor
<
kOCF
,
platform
::
CPUPlace
,
T
>
{
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
CPUPlace
,
T
>
{
public:
void
operator
()(
const
framework
::
Tensor
&
im
,
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
...
...
@@ -187,7 +194,8 @@ class Im2ColFunctor<kOCF, platform::CPUPlace, T> {
* [output_height, output_width, input_channels, filter_height, filter_width]
*/
template
<
class
T
>
class
Col2ImFunctor
<
kOCF
,
platform
::
CPUPlace
,
T
>
{
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
CPUPlace
,
T
>
{
public:
void
operator
()(
framework
::
Tensor
&
im
,
const
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
...
...
@@ -238,10 +246,14 @@ class Col2ImFunctor<kOCF, platform::CPUPlace, T> {
}
};
template
class
Im2ColFunctor
<
kOCF
,
platform
::
CPUPlace
,
float
>;
template
class
Im2ColFunctor
<
kOCF
,
platform
::
CPUPlace
,
double
>;
template
class
Col2ImFunctor
<
kOCF
,
platform
::
CPUPlace
,
float
>;
template
class
Col2ImFunctor
<
kOCF
,
platform
::
CPUPlace
,
double
>;
template
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
CPUPlace
,
float
>;
template
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
CPUPlace
,
double
>;
template
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
CPUPlace
,
float
>;
template
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
CPUPlace
,
double
>;
}
// namespace math
}
// namespace operators
...
...
paddle/operators/math/im2col.cu
浏览文件 @
32d7e618
...
...
@@ -61,7 +61,8 @@ __global__ void im2col(const T* data_im, int num_outs, int height, int width,
* [input_channels, filter_height, filter_width, output_height, output_width]
*/
template
<
class
T
>
class
Im2ColFunctor
<
kCFO
,
platform
::
GPUPlace
,
T
>
{
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
GPUPlace
,
T
>
{
public:
void
operator
()(
const
framework
::
Tensor
&
im
,
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
...
...
@@ -145,7 +146,8 @@ __global__ void col2im(size_t n, const T* data_col, size_t height, size_t width,
* [input_channels, filter_height, filter_width, output_height, output_width]
*/
template
<
class
T
>
class
Col2ImFunctor
<
kCFO
,
platform
::
GPUPlace
,
T
>
{
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
GPUPlace
,
T
>
{
public:
void
operator
()(
framework
::
Tensor
&
im
,
const
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
...
...
@@ -182,10 +184,14 @@ class Col2ImFunctor<kCFO, platform::GPUPlace, T> {
}
};
template
class
Im2ColFunctor
<
kCFO
,
platform
::
GPUPlace
,
float
>;
template
class
Im2ColFunctor
<
kCFO
,
platform
::
GPUPlace
,
double
>;
template
class
Col2ImFunctor
<
kCFO
,
platform
::
GPUPlace
,
float
>;
template
class
Col2ImFunctor
<
kCFO
,
platform
::
GPUPlace
,
double
>;
template
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
GPUPlace
,
float
>;
template
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
GPUPlace
,
double
>;
template
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
GPUPlace
,
float
>;
template
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kCFO
,
platform
::
GPUPlace
,
double
>;
template
<
class
T
>
__global__
void
im2colOCF
(
const
T
*
im_data
,
T
*
col_data
,
int
input_channels
,
...
...
@@ -226,7 +232,8 @@ __global__ void im2colOCF(const T* im_data, T* col_data, int input_channels,
* [output_height, output_width, input_channels, filter_height, filter_width]
*/
template
<
class
T
>
class
Im2ColFunctor
<
kOCF
,
platform
::
GPUPlace
,
T
>
{
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
GPUPlace
,
T
>
{
public:
void
operator
()(
const
framework
::
Tensor
&
im
,
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
...
...
@@ -308,7 +315,8 @@ __global__ void col2imOCF(T* im_data, const T* col_data, int input_channels,
* [output_height, output_width, input_channels, filter_height, filter_width]
*/
template
<
class
T
>
class
Col2ImFunctor
<
kOCF
,
platform
::
GPUPlace
,
T
>
{
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
GPUPlace
,
T
>
{
public:
void
operator
()(
framework
::
Tensor
&
im
,
const
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
...
...
@@ -352,10 +360,14 @@ class Col2ImFunctor<kOCF, platform::GPUPlace, T> {
}
};
template
class
Im2ColFunctor
<
kOCF
,
platform
::
GPUPlace
,
float
>;
template
class
Im2ColFunctor
<
kOCF
,
platform
::
GPUPlace
,
double
>;
template
class
Col2ImFunctor
<
kOCF
,
platform
::
GPUPlace
,
float
>;
template
class
Col2ImFunctor
<
kOCF
,
platform
::
GPUPlace
,
double
>;
template
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
GPUPlace
,
float
>;
template
class
Im2ColFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
GPUPlace
,
double
>;
template
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
GPUPlace
,
float
>;
template
class
Col2ImFunctor
<
paddle
::
operators
::
math
::
ColFormat
::
kOCF
,
platform
::
GPUPlace
,
double
>;
}
// namespace math
}
// namespace operators
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录