提交 cb3a74e4 编写于 作者: C chengduoZH

revert im2col

上级 7b0744ed
......@@ -126,19 +126,10 @@ class Col2ImFunctor<paddle::operators::math::ColFormat::kCFO,
T* im_data = im->data<T>();
const T* col_data = col.data<T>();
int w_offset = -1;
int h_offset = 0;
int c_im = 0;
for (int c = 0; c < channels_col; ++c) {
++w_offset;
if (w_offset == filter_width) {
w_offset = 0;
++h_offset;
if (h_offset == filter_height) {
h_offset = 0;
++c_im;
}
}
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 < col_height; ++h) {
int im_row_idx = h * stride[0] - padding[0] + h_offset * dilation[0];
for (int w = 0; w < col_width; ++w) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册