Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
f7be9cb9
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看板
提交
f7be9cb9
编写于
8月 30, 2017
作者:
H
hedaoyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refine the cpu code.
上级
6efbe2ff
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
186 addition
and
157 deletion
+186
-157
paddle/operators/math/CMakeLists.txt
paddle/operators/math/CMakeLists.txt
+2
-2
paddle/operators/math/im2col.cc
paddle/operators/math/im2col.cc
+174
-145
paddle/operators/math/im2col.h
paddle/operators/math/im2col.h
+10
-10
未找到文件。
paddle/operators/math/CMakeLists.txt
浏览文件 @
f7be9cb9
if
(
WITH_GPU
)
nv_library
(
math_function SRCS math_function.cc math_function.cu DEPS cblas device_context
)
nv_library
(
math_function SRCS math_function.cc math_function.cu
im2col.cc
DEPS cblas device_context
)
else
()
cc_library
(
math_function SRCS math_function.cc DEPS cblas device_context
)
cc_library
(
math_function SRCS math_function.cc
im2col.cc
DEPS cblas device_context
)
endif
()
nv_test
(
math_function_test SRCS math_function_test.cc DEPS math_function tensor
)
paddle/operators/math/im2col.cc
浏览文件 @
f7be9cb9
...
...
@@ -12,48 +12,54 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#include "
Im2C
ol.h"
#include "
paddle/operators/math/im2c
ol.h"
namespace
paddle
{
/*
* im
Shape = [inputChannels, inputHeight, inputW
idth]
* col
Shape
=
* [input
Channels, filterHeight, filterWidth, outputHeight, outputW
idth]
* im
= [input_channels, input_height, input_w
idth]
* col =
* [input
_channels, filter_height, filter_width, output_height, output_w
idth]
*/
template
<
class
T
>
class
Im2ColFunctor
<
kCFO
,
DEVICE_TYPE_CPU
,
T
>
{
class
Im2ColFunctor
<
kCFO
,
platform
::
CPUPlace
,
T
>
{
public:
void
operator
()(
const
T
*
imData
,
const
TensorShape
&
imShape
,
T
*
colData
,
const
TensorShape
&
colShape
,
int
strideHeight
,
int
strideWidth
,
int
paddingHeight
,
int
paddingWidth
)
{
int
inputChannels
=
imShape
[
0
];
int
inputHeight
=
imShape
[
1
];
int
inputWidth
=
imShape
[
2
];
int
filterHeight
=
colShape
[
1
];
int
filterWidth
=
colShape
[
2
];
int
outputHeight
=
colShape
[
3
];
int
outputWidth
=
colShape
[
4
];
int
channelsCol
=
inputChannels
*
filterHeight
*
filterWidth
;
for
(
int
c
=
0
;
c
<
channelsCol
;
++
c
)
{
int
wOffset
=
c
%
filterWidth
;
int
hOffset
=
(
c
/
filterWidth
)
%
filterHeight
;
int
c_im
=
c
/
filterWidth
/
filterHeight
;
for
(
int
h
=
0
;
h
<
outputHeight
;
++
h
)
{
for
(
int
w
=
0
;
w
<
outputWidth
;
++
w
)
{
int
imRowIdx
=
h
*
strideHeight
+
hOffset
;
int
imColIdx
=
w
*
strideWidth
+
wOffset
;
if
((
imRowIdx
-
paddingHeight
)
<
0
||
(
imRowIdx
-
paddingHeight
)
>=
inputHeight
||
(
imColIdx
-
paddingWidth
)
<
0
||
(
imColIdx
-
paddingWidth
)
>=
inputWidth
)
{
colData
[(
c
*
outputHeight
+
h
)
*
outputWidth
+
w
]
=
T
(
0
);
void
operator
()(
const
framework
::
Tensor
&
im
,
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
int
padding_width
)
{
PADDLE_ENFORCE
(
im
.
dims
().
size
()
==
3
);
PADDLE_ENFORCE
(
col
.
dims
().
size
()
==
5
);
int
input_channels
=
im
.
dims
()[
0
];
int
input_height
=
im
.
dims
()[
1
];
int
input_width
=
im
.
dims
()[
2
];
int
filter_height
=
col
.
dims
()[
1
];
int
filter_width
=
col
.
dims
()[
2
];
int
output_height
=
col
.
dims
()[
3
];
int
output_width
=
col
.
dims
()[
4
];
int
channels_col
=
input_channels
*
filter_height
*
filter_width
;
const
T
*
im_data
=
im
.
data
<
T
>
();
T
*
col_data
=
col
.
data
<
T
>
();
for
(
int
c
=
0
;
c
<
channels_col
;
++
c
)
{
int
w_offset
=
c
%
filter_width
;
int
h_offset
=
(
c
/
filter_width
)
%
filter_height
;
int
c_im
=
c
/
filter_width
/
filter_height
;
for
(
int
h
=
0
;
h
<
output_height
;
++
h
)
{
for
(
int
w
=
0
;
w
<
output_width
;
++
w
)
{
int
im_row_idx
=
h
*
stride_height
+
h_offset
;
int
im_col_idx
=
w
*
stride_width
+
w_offset
;
if
((
im_row_idx
-
padding_height
)
<
0
||
(
im_row_idx
-
padding_height
)
>=
input_height
||
(
im_col_idx
-
padding_width
)
<
0
||
(
im_col_idx
-
padding_width
)
>=
input_width
)
{
col_data
[(
c
*
output_height
+
h
)
*
output_width
+
w
]
=
T
(
0
);
}
else
{
im
RowIdx
+=
c_im
*
inputHeight
-
paddingH
eight
;
im
ColIdx
-=
paddingW
idth
;
col
Data
[(
c
*
outputHeight
+
h
)
*
outputW
idth
+
w
]
=
im
Data
[
imRowIdx
*
inputWidth
+
imColI
dx
];
im
_row_idx
+=
c_im
*
input_height
-
padding_h
eight
;
im
_col_idx
-=
padding_w
idth
;
col
_data
[(
c
*
output_height
+
h
)
*
output_w
idth
+
w
]
=
im
_data
[
im_row_idx
*
input_width
+
im_col_i
dx
];
}
}
}
...
...
@@ -62,41 +68,46 @@ class Im2ColFunctor<kCFO, DEVICE_TYPE_CPU, T> {
};
/*
* im
Shape = [inputChannels, inputHeight, inputW
idth]
* col
Shape
=
* [input
Channels, filterHeight, filterWidth, outputHeight, outputW
idth]
* im
= [input_channels, input_height, input_w
idth]
* col =
* [input
_channels, filter_height, filter_width, output_height, output_w
idth]
*/
template
<
class
T
>
class
Col2ImFunctor
<
kCFO
,
DEVICE_TYPE_CPU
,
T
>
{
class
Col2ImFunctor
<
kCFO
,
platform
::
CPUPlace
,
T
>
{
public:
void
operator
()(
T
*
imData
,
const
TensorShape
&
imShape
,
const
T
*
colData
,
const
TensorShape
&
colShape
,
int
strideHeight
,
int
strideWidth
,
int
paddingHeight
,
int
paddingWidth
)
{
int
inputChannels
=
imShape
[
0
];
int
inputHeight
=
imShape
[
1
];
int
inputWidth
=
imShape
[
2
];
int
filterHeight
=
colShape
[
1
];
int
filterWidth
=
colShape
[
2
];
int
outputHeight
=
colShape
[
3
];
int
outputWidth
=
colShape
[
4
];
int
channelsCol
=
inputChannels
*
filterHeight
*
filterWidth
;
for
(
int
c
=
0
;
c
<
channelsCol
;
++
c
)
{
int
wOffset
=
c
%
filterWidth
;
int
hOffset
=
(
c
/
filterWidth
)
%
filterHeight
;
int
c_im
=
c
/
filterWidth
/
filterHeight
;
for
(
int
h
=
0
;
h
<
outputHeight
;
++
h
)
{
for
(
int
w
=
0
;
w
<
outputWidth
;
++
w
)
{
int
imRowIdx
=
h
*
strideHeight
+
hOffset
;
int
imColIdx
=
w
*
strideWidth
+
wOffset
;
if
((
imRowIdx
-
paddingHeight
)
>=
0
&&
(
imRowIdx
-
paddingHeight
)
<
inputHeight
&&
(
imColIdx
-
paddingWidth
)
>=
0
&&
(
imColIdx
-
paddingWidth
)
<
inputWidth
)
{
imRowIdx
+=
c_im
*
inputHeight
-
paddingHeight
;
imColIdx
-=
paddingWidth
;
imData
[
imRowIdx
*
inputWidth
+
imColIdx
]
+=
colData
[(
c
*
outputHeight
+
h
)
*
outputWidth
+
w
];
void
operator
()(
framework
::
Tensor
&
im
,
const
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
int
padding_width
)
{
PADDLE_ENFORCE
(
im
.
dims
().
size
()
==
3
);
PADDLE_ENFORCE
(
col
.
dims
().
size
()
==
5
);
int
input_channels
=
im
.
dims
()[
0
];
int
input_height
=
im
.
dims
()[
1
];
int
input_width
=
im
.
dims
()[
2
];
int
filter_height
=
col
.
dims
()[
1
];
int
filter_width
=
col
.
dims
()[
2
];
int
output_height
=
col
.
dims
()[
3
];
int
output_width
=
col
.
dims
()[
4
];
int
channels_col
=
input_channels
*
filter_height
*
filter_width
;
T
*
im_data
=
im
.
data
<
T
>
();
const
T
*
col_data
=
col
.
data
<
T
>
();
for
(
int
c
=
0
;
c
<
channels_col
;
++
c
)
{
int
w_offset
=
c
%
filter_width
;
int
h_offset
=
(
c
/
filter_width
)
%
filter_height
;
int
c_im
=
c
/
filter_width
/
filter_height
;
for
(
int
h
=
0
;
h
<
output_height
;
++
h
)
{
for
(
int
w
=
0
;
w
<
output_width
;
++
w
)
{
int
im_row_idx
=
h
*
stride_height
+
h_offset
;
int
im_col_idx
=
w
*
stride_width
+
w_offset
;
if
((
im_row_idx
-
padding_height
)
>=
0
&&
(
im_row_idx
-
padding_height
)
<
input_height
&&
(
im_col_idx
-
padding_width
)
>=
0
&&
(
im_col_idx
-
padding_width
)
<
input_width
)
{
im_row_idx
+=
c_im
*
input_height
-
padding_height
;
im_col_idx
-=
padding_width
;
im_data
[
im_row_idx
*
input_width
+
im_col_idx
]
+=
col_data
[(
c
*
output_height
+
h
)
*
output_width
+
w
];
}
}
}
...
...
@@ -104,52 +115,61 @@ class Col2ImFunctor<kCFO, DEVICE_TYPE_CPU, T> {
}
};
template
class
Im2ColFunctor
<
kCFO
,
DEVICE_TYPE_CPU
,
float
>;
template
class
Im2ColFunctor
<
kCFO
,
DEVICE_TYPE_CPU
,
double
>;
template
class
Col2ImFunctor
<
kCFO
,
DEVICE_TYPE_CPU
,
float
>;
template
class
Col2ImFunctor
<
kCFO
,
DEVICE_TYPE_CPU
,
double
>;
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
>;
/*
* im
Shape = [inputChannels, inputHeight, inputW
idth]
* col
Shape
=
* [output
Height, outputWidth, inputChannels, filterHeight, filterW
idth]
* im
= [input_channels, input_height, input_w
idth]
* col =
* [output
_height, output_width, input_channels, filter_height, filter_w
idth]
*/
template
<
class
T
>
class
Im2ColFunctor
<
kOCF
,
DEVICE_TYPE_CPU
,
T
>
{
class
Im2ColFunctor
<
kOCF
,
platform
::
CPUPlace
,
T
>
{
public:
void
operator
()(
const
T
*
imData
,
const
TensorShape
&
imShape
,
T
*
colData
,
const
TensorShape
&
colShape
,
int
strideHeight
,
int
strideWidth
,
int
paddingHeight
,
int
paddingWidth
)
{
int
inputChannels
=
imShape
[
0
];
int
inputHeight
=
imShape
[
1
];
int
inputWidth
=
imShape
[
2
];
int
filterHeight
=
colShape
[
3
];
int
filterWidth
=
colShape
[
4
];
int
outputHeight
=
colShape
[
0
];
int
outputWidth
=
colShape
[
1
];
for
(
int
outputH
=
0
;
outputH
<
outputHeight
;
++
outputH
)
{
for
(
int
outputW
=
0
;
outputW
<
outputWidth
;
++
outputW
)
{
for
(
int
channel
=
0
;
channel
<
inputChannels
;
++
channel
)
{
for
(
int
filterH
=
0
;
filterH
<
filterHeight
;
++
filterH
)
{
for
(
int
filterW
=
0
;
filterW
<
filterWidth
;
++
filterW
)
{
int
imRowOffset
=
outputH
*
strideHeight
+
filterH
-
paddingHeight
;
int
imColOffset
=
outputW
*
strideWidth
+
filterW
-
paddingWidth
;
int
colDataOffset
=
(((
outputH
*
outputWidth
+
outputW
)
*
inputChannels
+
channel
)
*
filterHeight
+
filterH
)
*
filterWidth
+
filterW
;
if
(
imRowOffset
<
0
||
imRowOffset
>=
inputHeight
||
imColOffset
<
0
||
imColOffset
>=
inputWidth
)
{
colData
[
colDataOffset
]
=
float
(
0
);
void
operator
()(
const
framework
::
Tensor
&
im
,
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
int
padding_width
)
{
PADDLE_ENFORCE
(
im
.
dims
().
size
()
==
3
);
PADDLE_ENFORCE
(
col
.
dims
().
size
()
==
5
);
int
input_channels
=
im
.
dims
()[
0
];
int
input_height
=
im
.
dims
()[
1
];
int
input_width
=
im
.
dims
()[
2
];
int
filter_height
=
col
.
dims
()[
3
];
int
filter_width
=
col
.
dims
()[
4
];
int
output_height
=
col
.
dims
()[
0
];
int
output_width
=
col
.
dims
()[
1
];
const
T
*
im_data
=
im
.
data
<
T
>
();
T
*
col_data
=
col
.
data
<
T
>
();
for
(
int
col_row_idx
=
0
;
col_row_idx
<
output_height
;
++
col_row_idx
)
{
for
(
int
col_col_idx
=
0
;
col_col_idx
<
output_width
;
++
col_col_idx
)
{
for
(
int
channel
=
0
;
channel
<
input_channels
;
++
channel
)
{
for
(
int
filter_row_idx
=
0
;
filter_row_idx
<
filter_height
;
++
filter_row_idx
)
{
for
(
int
filter_col_idx
=
0
;
filter_col_idx
<
filter_width
;
++
filter_col_idx
)
{
int
im_row_offset
=
col_row_idx
*
stride_height
+
filter_row_idx
-
padding_height
;
int
im_col_offset
=
col_col_idx
*
stride_width
+
filter_col_idx
-
padding_width
;
int
col_offset
=
(((
col_row_idx
*
output_width
+
col_col_idx
)
*
input_channels
+
channel
)
*
filter_height
+
filter_row_idx
)
*
filter_width
+
filter_col_idx
;
if
(
im_row_offset
<
0
||
im_row_offset
>=
input_height
||
im_col_offset
<
0
||
im_col_offset
>=
input_width
)
{
col_data
[
col_offset
]
=
T
(
0
);
}
else
{
int
im
DataO
ffset
=
(
channel
*
input
Height
+
imRowOffset
)
*
inputW
idth
+
im
ColO
ffset
;
col
Data
[
colDataOffset
]
=
imData
[
imDataO
ffset
];
int
im
_o
ffset
=
(
channel
*
input
_height
+
im_row_offset
)
*
input_w
idth
+
im
_col_o
ffset
;
col
_data
[
col_offset
]
=
im_data
[
im_o
ffset
];
}
}
}
...
...
@@ -160,44 +180,53 @@ class Im2ColFunctor<kOCF, DEVICE_TYPE_CPU, T> {
};
/*
* im
Shape = [inputChannels, inputHeight, inputW
idth]
* col
Shape
=
* [output
Height, outputWidth, inputChannels, filterHeight, filterW
idth]
* im
= [input_channels, input_height, input_w
idth]
* col =
* [output
_height, output_width, input_channels, filter_height, filter_w
idth]
*/
template
<
class
T
>
class
Col2ImFunctor
<
kOCF
,
DEVICE_TYPE_CPU
,
T
>
{
class
Col2ImFunctor
<
kOCF
,
platform
::
CPUPlace
,
T
>
{
public:
void
operator
()(
T
*
imData
,
const
TensorShape
&
imShape
,
const
T
*
colData
,
const
TensorShape
&
colShape
,
int
strideHeight
,
int
strideWidth
,
int
paddingHeight
,
int
paddingWidth
)
{
int
inputChannels
=
imShape
[
0
];
int
inputHeight
=
imShape
[
1
];
int
inputWidth
=
imShape
[
2
];
int
filterHeight
=
colShape
[
3
];
int
filterWidth
=
colShape
[
4
];
int
outputHeight
=
colShape
[
0
];
int
outputWidth
=
colShape
[
1
];
for
(
int
outputH
=
0
;
outputH
<
outputHeight
;
++
outputH
)
{
for
(
int
outputW
=
0
;
outputW
<
outputWidth
;
++
outputW
)
{
for
(
int
channel
=
0
;
channel
<
inputChannels
;
++
channel
)
{
for
(
int
filterH
=
0
;
filterH
<
filterHeight
;
++
filterH
)
{
for
(
int
filterW
=
0
;
filterW
<
filterWidth
;
++
filterW
)
{
int
imRowOffset
=
outputH
*
strideHeight
+
filterH
-
paddingHeight
;
int
imColOffset
=
outputW
*
strideWidth
+
filterW
-
paddingWidth
;
int
colDataOffset
=
(((
outputH
*
outputWidth
+
outputW
)
*
inputChannels
+
channel
)
*
filterHeight
+
filterH
)
*
filterWidth
+
filterW
;
if
(
imRowOffset
>=
0
&&
imRowOffset
<
inputHeight
&&
imColOffset
>=
0
&&
imColOffset
<
inputWidth
)
{
int
imDataOffset
=
(
channel
*
inputHeight
+
imRowOffset
)
*
inputWidth
+
imColOffset
;
imData
[
imDataOffset
]
+=
colData
[
colDataOffset
];
void
operator
()(
framework
::
Tensor
&
im
,
const
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_height
,
int
padding_width
)
{
PADDLE_ENFORCE
(
im
.
dims
().
size
()
==
3
);
PADDLE_ENFORCE
(
col
.
dims
().
size
()
==
5
);
int
input_channels
=
im
.
dims
()[
0
];
int
input_height
=
im
.
dims
()[
1
];
int
input_width
=
im
.
dims
()[
2
];
int
filter_height
=
col
.
dims
()[
3
];
int
filter_width
=
col
.
dims
()[
4
];
int
output_height
=
col
.
dims
()[
0
];
int
output_width
=
col
.
dims
()[
1
];
T
*
im_data
=
im
.
data
<
T
>
();
const
T
*
col_data
=
col
.
data
<
T
>
();
for
(
int
col_row_idx
=
0
;
col_row_idx
<
output_height
;
++
col_row_idx
)
{
for
(
int
col_col_idx
=
0
;
col_col_idx
<
output_width
;
++
col_col_idx
)
{
for
(
int
channel
=
0
;
channel
<
input_channels
;
++
channel
)
{
for
(
int
filter_row_idx
=
0
;
filter_row_idx
<
filter_height
;
++
filter_row_idx
)
{
for
(
int
filter_col_idx
=
0
;
filter_col_idx
<
filter_width
;
++
filter_col_idx
)
{
int
im_row_offset
=
col_row_idx
*
stride_height
+
filter_row_idx
-
padding_height
;
int
im_col_offset
=
col_col_idx
*
stride_width
+
filter_col_idx
-
padding_width
;
int
col_offset
=
(((
col_row_idx
*
output_width
+
col_col_idx
)
*
input_channels
+
channel
)
*
filter_height
+
filter_row_idx
)
*
filter_width
+
filter_col_idx
;
if
(
im_row_offset
>=
0
&&
im_row_offset
<
input_height
&&
im_col_offset
>=
0
&&
im_col_offset
<
input_width
)
{
int
im_offset
=
(
channel
*
input_height
+
im_row_offset
)
*
input_width
+
im_col_offset
;
im_data
[
im_offset
]
+=
col_data
[
col_offset
];
}
}
}
...
...
@@ -207,9 +236,9 @@ class Col2ImFunctor<kOCF, DEVICE_TYPE_CPU, T> {
}
};
template
class
Im2ColFunctor
<
kOCF
,
DEVICE_TYPE_CPU
,
float
>;
template
class
Im2ColFunctor
<
kOCF
,
DEVICE_TYPE_CPU
,
double
>;
template
class
Col2ImFunctor
<
kOCF
,
DEVICE_TYPE_CPU
,
float
>;
template
class
Col2ImFunctor
<
kOCF
,
DEVICE_TYPE_CPU
,
double
>;
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
>;
}
// namespace paddle
paddle/operators/math/im2col.h
浏览文件 @
f7be9cb9
...
...
@@ -14,8 +14,8 @@ limitations under the License. */
#pragma once
#include "
TensorShape
.h"
#include "
TensorType
.h"
#include "
paddle/framework/tensor
.h"
#include "
paddle/platform/device_context
.h"
namespace
paddle
{
...
...
@@ -67,20 +67,20 @@ enum ColFormat { kCFO = 0, kOCF = 1 };
* \note The caller needs to ensure that imShape.inputChannels is equal to
* colShape.inputChannels.
*/
template
<
ColFormat
Format
,
DeviceType
Device
,
class
T
>
template
<
ColFormat
Format
,
typename
Place
,
typename
T
>
class
Im2ColFunctor
{
public:
void
operator
()(
const
T
*
imData
,
const
TensorShape
&
imShape
,
T
*
colData
,
const
TensorShape
&
colShape
,
int
strideH
eight
,
int
strideWidth
,
int
paddingHeight
,
int
paddingW
idth
);
void
operator
()(
const
framework
::
Tensor
&
im
,
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_h
eight
,
int
padding_w
idth
);
};
template
<
ColFormat
Format
,
DeviceType
Device
,
class
T
>
template
<
ColFormat
Format
,
typename
Place
,
typename
T
>
class
Col2ImFunctor
{
public:
void
operator
()(
T
*
imData
,
const
TensorShape
&
imShape
,
const
T
*
colData
,
const
TensorShape
&
colShape
,
int
strideH
eight
,
int
strideWidth
,
int
paddingHeight
,
int
paddingW
idth
);
void
operator
()(
framework
::
Tensor
&
im
,
const
framework
::
Tensor
&
col
,
int
stride_height
,
int
stride_width
,
int
padding_h
eight
,
int
padding_w
idth
);
};
}
// namespace paddle
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录