From e2f85cfa5064e67d979015c9e3a5edf66d2592d1 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Sun, 27 Mar 2022 14:54:20 +0200 Subject: [PATCH 1/3] Create .test-cache --- make.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/make.sh b/make.sh index bf89eb1..ca2287c 100755 --- a/make.sh +++ b/make.sh @@ -29,6 +29,7 @@ if [[ $1 == "test" ]]; then exit elif [[ $2 == "run" ]]; then $0 test build + mkdir -p .test-cache for i in $(ls out/test_*); do echo "--- $i ---" $i From 1c1511e5f4c97b5c2fb4e2c4518f5c5554dd6251 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Sun, 27 Mar 2022 14:54:35 +0200 Subject: [PATCH 2/3] Fix struct --- src/mnist/struct/neuron.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mnist/struct/neuron.c b/src/mnist/struct/neuron.c index 112a915..adc98c4 100644 --- a/src/mnist/struct/neuron.c +++ b/src/mnist/struct/neuron.c @@ -13,10 +13,10 @@ typedef struct Neurone{ typedef struct Couche{ int nb_neurone; // Nombre de neurones dans la couche (longueur de la liste ci-dessous) - Neurone* neurone; // Liste des neurones dans la couche + Neurone** neurone; // Liste des neurones dans la couche } Couche; typedef struct Reseau{ int nb_couche; - Couche* couche; -} Reseau; \ No newline at end of file + Couche** couche; +} Reseau; From 4a8ab009ce9997c36d7f973c9f5f785482673efd Mon Sep 17 00:00:00 2001 From: augustin64 Date: Sun, 27 Mar 2022 15:03:13 +0200 Subject: [PATCH 3/3] Add make.sh instructions --- make.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/make.sh b/make.sh index ca2287c..12d1c9e 100755 --- a/make.sh +++ b/make.sh @@ -6,7 +6,9 @@ if [[ $1 == "preview" ]]; then [[ $2 ]] || set -- "$1" "build" if [[ $2 == "build" ]]; then mkdir -p out + echo "Compilation de src/mnist/preview.c" gcc src/mnist/preview.c -o out/preview_mnist $FLAGS + echo "Fait." exit elif [[ $2 == "train" ]]; then [[ -f out/preview_mnist ]] || $0 preview build @@ -24,7 +26,9 @@ if [[ $1 == "test" ]]; then if [[ $2 == "build" ]]; then mkdir -p out for i in $(ls test); do + echo "Compilation de test/$i" gcc "test/$i" -o "out/test_$(echo $i | awk -F. '{print $1}')" $FLAGS + echo "Fait." done exit elif [[ $2 == "run" ]]; then @@ -37,3 +41,8 @@ if [[ $1 == "test" ]]; then exit fi fi + +echo "Usage:" +echo -e "\t$0 preview ( build | train | t10k )" +echo -e "\t$0 test ( build | run )\n" +echo -e "Les fichiers de test sont recompilés à chaque exécution,\nles autres programmes sont compilés automatiquement si manquants"