Fix issues

This commit is contained in:
julienChemillier 2022-11-15 12:58:00 +01:00
parent d94f61bb77
commit f5f22c6b3e
2 changed files with 2 additions and 7 deletions

View File

@ -51,7 +51,7 @@ void* train_thread(void* parameters) {
if (dataset_type == 0) { if (dataset_type == 0) {
write_image_in_network_32(images[i], height, width, network->input[0][0]); write_image_in_network_32(images[i], height, width, network->input[0][0]);
forward_propagation(network); forward_propagation(network);
maxi = indice_max(network, 10); maxi = indice_max(network->input[network->size-1][0][0], 10);
backward_propagation(network, labels[i]); backward_propagation(network, labels[i]);
if (cpt==16) { // Update the network if (cpt==16) { // Update the network
printf("a\n"); printf("a\n");

View File

@ -2,11 +2,6 @@
#include "include/update.h" #include "include/update.h"
#include "include/struct.h" #include "include/struct.h"
#include <stdio.h>
void update_weights(Network* network) { void update_weights(Network* network) {
int n = network->size; int n = network->size;
int input_depth, input_width, output_depth, output_width, k_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]; output_width = network->width[i+1];
if (k_i->cnn) { // Convolution if (k_i->cnn) { // Convolution
Kernel_cnn* cnn = k_i->cnn; // ERRORS Kernel_cnn* cnn = k_i->cnn;
k_size = cnn->k_size; k_size = cnn->k_size;
for (int a=0; a<input_depth; a++) { for (int a=0; a<input_depth; a++) {
for (int b=0; b<output_depth; b++) { for (int b=0; b<output_depth; b++) {