提交 6faca105 编写于 作者: Y yangfei

repair bug of im2col

上级 5a6ae208
......@@ -73,9 +73,7 @@ class Im2ColFunctor<ColFormat::kCFO, CPU, T> {
const int osize = col_height;
const int isize = im_height;
bool pad1 = padding[0] > 0;
bool pad2 =
(pad1 &&
(((isize - 2 * padding[0] + filter_height) % stride[0] == 0) ? 1 : 0));
bool pad2 = padding[1] > 0;
int fill = isize % 2;
if (stride[0] == 1 && filter_height == 3 && pad1 && pad2 &&
dilation[0] == 1 && im_height > 2) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册