diff --git a/src/cnn/train.c b/src/cnn/train.c index afdcd98..22b4c07 100644 --- a/src/cnn/train.c +++ b/src/cnn/train.c @@ -51,7 +51,7 @@ void* train_thread(void* parameters) { if (dataset_type == 0) { write_image_in_network_32(images[i], height, width, network->input[0][0]); forward_propagation(network); - maxi = indice_max(network, 10); + maxi = indice_max(network->input[network->size-1][0][0], 10); backward_propagation(network, labels[i]); if (cpt==16) { // Update the network printf("a\n"); diff --git a/src/cnn/update.c b/src/cnn/update.c index 0e2e2bf..419bdb6 100644 --- a/src/cnn/update.c +++ b/src/cnn/update.c @@ -2,11 +2,6 @@ #include "include/update.h" #include "include/struct.h" - -#include - - - void update_weights(Network* network) { int n = network->size; int input_depth, input_width, output_depth, output_width, k_size; @@ -19,7 +14,7 @@ void update_weights(Network* network) { output_width = network->width[i+1]; if (k_i->cnn) { // Convolution - Kernel_cnn* cnn = k_i->cnn; // ERRORS + Kernel_cnn* cnn = k_i->cnn; k_size = cnn->k_size; for (int a=0; a