aboutsummaryrefslogtreecommitdiff
path: root/src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs')
-rw-r--r--src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs b/src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs
index 1e0fee4688..401b002111 100644
--- a/src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs
+++ b/src/core/GLES_COMPUTE/cs_shaders/pooling_layer.cs
@@ -608,8 +608,8 @@ void main(void)
// Divide by pool region in case of average pooling
int start_x = int(gl_GlobalInvocationID.x) * STRIDE_X - PAD_X;
int start_y = int(gl_GlobalInvocationID.y) * STRIDE_Y - PAD_Y;
- int end_x = int(min(STRIDE_X + POOL_SIZE, MAX_WIDTH));
- int end_y = int(min(STRIDE_Y + POOL_SIZE, MAX_HEIGHT));
+ int end_x = int(min(start_x + POOL_SIZE, MAX_WIDTH));
+ int end_y = int(min(start_y + POOL_SIZE, MAX_HEIGHT));
float res1 = float((end_y - start_y) * (end_x - start_x));
res = DIV_OP(res, res1);
}