mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 23:26:25 +01:00
Rename variable
This commit is contained in:
parent
f3760069f8
commit
b5c4384e42
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user