mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-24 07:36:24 +01:00
commit
058dcf7239
10
make.sh
10
make.sh
@ -6,7 +6,9 @@ if [[ $1 == "preview" ]]; then
|
|||||||
[[ $2 ]] || set -- "$1" "build"
|
[[ $2 ]] || set -- "$1" "build"
|
||||||
if [[ $2 == "build" ]]; then
|
if [[ $2 == "build" ]]; then
|
||||||
mkdir -p out
|
mkdir -p out
|
||||||
|
echo "Compilation de src/mnist/preview.c"
|
||||||
gcc src/mnist/preview.c -o out/preview_mnist $FLAGS
|
gcc src/mnist/preview.c -o out/preview_mnist $FLAGS
|
||||||
|
echo "Fait."
|
||||||
exit
|
exit
|
||||||
elif [[ $2 == "train" ]]; then
|
elif [[ $2 == "train" ]]; then
|
||||||
[[ -f out/preview_mnist ]] || $0 preview build
|
[[ -f out/preview_mnist ]] || $0 preview build
|
||||||
@ -24,11 +26,14 @@ if [[ $1 == "test" ]]; then
|
|||||||
if [[ $2 == "build" ]]; then
|
if [[ $2 == "build" ]]; then
|
||||||
mkdir -p out
|
mkdir -p out
|
||||||
for i in $(ls test); do
|
for i in $(ls test); do
|
||||||
|
echo "Compilation de test/$i"
|
||||||
gcc "test/$i" -o "out/test_$(echo $i | awk -F. '{print $1}')" $FLAGS
|
gcc "test/$i" -o "out/test_$(echo $i | awk -F. '{print $1}')" $FLAGS
|
||||||
|
echo "Fait."
|
||||||
done
|
done
|
||||||
exit
|
exit
|
||||||
elif [[ $2 == "run" ]]; then
|
elif [[ $2 == "run" ]]; then
|
||||||
$0 test build
|
$0 test build
|
||||||
|
mkdir -p .test-cache
|
||||||
for i in $(ls out/test_*); do
|
for i in $(ls out/test_*); do
|
||||||
echo "--- $i ---"
|
echo "--- $i ---"
|
||||||
$i
|
$i
|
||||||
@ -36,3 +41,8 @@ if [[ $1 == "test" ]]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
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"
|
||||||
|
@ -13,10 +13,10 @@ typedef struct Neurone{
|
|||||||
|
|
||||||
typedef struct Couche{
|
typedef struct Couche{
|
||||||
int nb_neurone; // Nombre de neurones dans la couche (longueur de la liste ci-dessous)
|
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;
|
} Couche;
|
||||||
|
|
||||||
typedef struct Reseau{
|
typedef struct Reseau{
|
||||||
int nb_couche;
|
int nb_couche;
|
||||||
Couche* couche;
|
Couche** couche;
|
||||||
} Reseau;
|
} Reseau;
|
Loading…
Reference in New Issue
Block a user