mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 23:26:25 +01:00
Update train.c
This commit is contained in:
parent
6917711271
commit
61468044a9
@ -46,7 +46,7 @@ void* train_thread(void* parameters) {
|
||||
write_image_in_network_32(images[index[i]], height, width, network->input[0][0]);
|
||||
forward_propagation(network);
|
||||
maxi = indice_max(network->input[network->size-1][0][0], 10);
|
||||
backward_propagation(network, labels[i]);
|
||||
backward_propagation(network, labels[index[i]]);
|
||||
|
||||
if (maxi == labels[index[i]]) {
|
||||
accuracy += 1.;
|
||||
@ -294,7 +294,7 @@ void train(int dataset_type, char* images_file, char* labels_file, char* data_di
|
||||
#else
|
||||
free(train_params);
|
||||
#endif
|
||||
|
||||
|
||||
if (dataset_type == 0) {
|
||||
for (int i=0; i < nb_images_total; i++) {
|
||||
for (int j=0; j < 28; j++) {
|
||||
|
Loading…
Reference in New Issue
Block a user