diff --git a/src/cnn/convolution.c b/src/cnn/convolution.c index 57a14e1..49a4a1c 100644 --- a/src/cnn/convolution.c +++ b/src/cnn/convolution.c @@ -38,7 +38,7 @@ void make_convolution_cpu(Kernel_cnn* kernel, float*** input, float*** output, i } } } - output[i][j][k] = f/kernel->k_size; // Average + output[i][j][k] = f; } } } @@ -80,7 +80,7 @@ __global__ void make_convolution_kernel(int k_size, int columns, int rows, float } output_offset = (float*)((char*)output + (idx*output_dim+idy)*pitch_output); - output_offset[idz] = f/(k_size); + output_offset[idz] = f; } void make_convolution_device(Kernel_cnn* kernel, float*** input, float*** output, int output_dim) { diff --git a/src/cnn/convolution.cu b/src/cnn/convolution.cu index 7ee2839..b944bcb 100644 --- a/src/cnn/convolution.cu +++ b/src/cnn/convolution.cu @@ -36,7 +36,7 @@ void make_convolution_cpu(Kernel_cnn* kernel, float*** input, float*** output, i } } } - output[i][j][k] = f/kernel->k_size; // Average + output[i][j][k] = f; } } } @@ -78,7 +78,7 @@ __global__ void make_convolution_kernel(int k_size, int columns, int rows, float } output_offset = (float*)((char*)output + (idx*output_dim+idy)*pitch_output); - output_offset[idz] = f/(k_size); + output_offset[idz] = f; } void make_convolution_device(Kernel_cnn* kernel, float*** input, float*** output, int output_dim) { diff --git a/src/cnn/include/print.h b/src/cnn/include/print.h index 8969760..1b9fe50 100644 --- a/src/cnn/include/print.h +++ b/src/cnn/include/print.h @@ -1,7 +1,7 @@ #ifndef DEF_PRINT_H #define DEF_PRINT_H -#include "include/struct.h" +#include "struct.h" /* * Affiche le kernel d'une couche de convolution