From 23cb35e6c8eae8b59fab161036ae3f417a55c8db Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Fri, 30 Mar 2018 11:46:51 +0000
Subject: [PATCH] Changed small_object
---
src/col2im.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/col2im.c b/src/col2im.c
index d63a1e0..5c4605e 100644
--- a/src/col2im.c
+++ b/src/col2im.c
@@ -16,13 +16,9 @@
int ksize, int stride, int pad, float* data_im)
{
int c,h,w;
- int height_col = (height - ksize) / stride + 1;
- int width_col = (width - ksize) / stride + 1;
- if (pad){
- height_col = 1 + (height-1) / stride;
- width_col = 1 + (width-1) / stride;
- pad = ksize/2;
- }
+ int height_col = (height + 2*pad - ksize) / stride + 1;
+ int width_col = (width + 2*pad - ksize) / stride + 1;
+
int channels_col = channels * ksize * ksize;
for (c = 0; c < channels_col; ++c) {
int w_offset = c % ksize;
--
Gitblit v1.10.0