Rename variable

This commit is contained in:
augustin64 2023-01-13 22:17:37 +01:00
parent f3760069f8
commit b5c4384e42

View File

@ -8,18 +8,18 @@
void make_average_pooling(float*** input, float*** output, int size, int output_depth, int output_dim) { 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] // input[output_depth][output_dim+size-1][output_dim+size-1]
// output[output_depth][output_dim][output_dim] // output[output_depth][output_dim][output_dim]
float average; float sum;
int n = size*size; int n = size*size;
for (int i=0; i < output_depth; i++) { for (int i=0; i < output_depth; i++) {
for (int j=0; j < output_dim; j++) { for (int j=0; j < output_dim; j++) {
for (int k=0; k < output_dim; k++) { for (int k=0; k < output_dim; k++) {
average = 0.; sum = 0.;
for (int a=0; a < size; a++) { for (int a=0; a < size; a++) {
for (int b=0; b < size; b++) { 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;
} }
} }
} }