From b5c4384e42619a6f8f17c6855353583bf7e6642a Mon Sep 17 00:00:00 2001 From: augustin64 Date: Fri, 13 Jan 2023 22:17:37 +0100 Subject: [PATCH] Rename variable --- src/cnn/make.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cnn/make.c b/src/cnn/make.c index b403d3c..9f1016e 100644 --- a/src/cnn/make.c +++ b/src/cnn/make.c @@ -8,18 +8,18 @@ void make_average_pooling(float*** input, float*** output, int size, int output_depth, int output_dim) { // input[output_depth][output_dim+size-1][output_dim+size-1] // output[output_depth][output_dim][output_dim] - float average; + float sum; int n = size*size; for (int i=0; i < output_depth; i++) { for (int j=0; j < output_dim; j++) { for (int k=0; k < output_dim; k++) { - average = 0.; + sum = 0.; for (int a=0; a < size; a++) { for (int b=0; b < size; b++) { - average += input[i][size*j +a][size*k +b]; + sum += input[i][size*j +a][size*k +b]; } } - output[i][j][k] = average/(float)n; + output[i][j][k] = sum/(float)n; } } }