Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tarot
tarot
Commits
1af99375
Commit
1af99375
authored
Nov 26, 2019
by
Vivien Kraus
Browse files
Print the weights for each iteration
parent
9d7320ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
po/fr.po
View file @
1af99375
...
...
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: tarot 0.4.2.83-ebdc-dirty\n"
"Report-Msgid-Bugs-To: vivien@planete-kraus.eu\n"
"POT-Creation-Date: 2019-11-27 08:0
4
+0100\n"
"PO-Revision-Date: 2019-11-2
4 17:44
+0100\n"
"POT-Creation-Date: 2019-11-27 08:0
7
+0100\n"
"PO-Revision-Date: 2019-11-2
6 20:11
+0100\n"
"Last-Translator: Vivien Kraus <vivien@planete-kraus.eu>\n"
"Language-Team: French\n"
"Language: fr\n"
...
...
@@ -48,7 +48,7 @@ msgstr "Affiche l'information de version et quitte"
#: src/tarot-app/tarot_deal.c:70 src/tarot-app/tarot_mcts.c:88
#: src/tarot-app/tarot_stacking.c:80 src/tarot-app/tarot_features.c:62
#: src/tarot-app/tarot_cnn_features.c:58
#: src/tarot-app/tarot_perceptron_bootstrap.c:6
0
#: src/tarot-app/tarot_perceptron_bootstrap.c:6
1
msgid "version"
msgstr "version"
...
...
@@ -56,7 +56,7 @@ msgstr "version"
#: src/tarot-app/tarot_deal.c:112 src/tarot-app/tarot_mcts.c:136
#: src/tarot-app/tarot_stacking.c:112 src/tarot-app/tarot_features.c:93
#: src/tarot-app/tarot_cnn_features.c:89
#: src/tarot-app/tarot_perceptron_bootstrap.c:9
7
#: src/tarot-app/tarot_perceptron_bootstrap.c:9
8
#, c-format
msgid ""
"%s (libtarot %s)\n"
...
...
@@ -1205,7 +1205,7 @@ msgstr ""
#: src/tarot-app/tarot_deal.c:69 src/tarot-app/tarot_mcts.c:87
#: src/tarot-app/tarot_stacking.c:79 src/tarot-app/tarot_features.c:61
#: src/tarot-app/tarot_cnn_features.c:57
#: src/tarot-app/tarot_perceptron_bootstrap.c:
59
#: src/tarot-app/tarot_perceptron_bootstrap.c:
60
msgid "help"
msgstr "aide"
...
...
@@ -1222,7 +1222,7 @@ msgid "no-call-allowed"
msgstr "appel-interdit"
#: src/tarot-app/tarot_deal.c:74 src/tarot-app/tarot_mcts.c:90
#: src/tarot-app/tarot_perceptron_bootstrap.c:6
3
#: src/tarot-app/tarot_perceptron_bootstrap.c:6
4
msgid "seed"
msgstr "graine"
...
...
@@ -1573,15 +1573,20 @@ msgstr "Poignée"
msgid "Discarding"
msgstr "Écart"
#: src/tarot-app/tarot_perceptron_bootstrap.c:61
#: src/tarot-app/tarot_perceptron_bootstrap.c:37
#, c-format
msgid "Mean update\tValidation score\tMaximum weight\n"
msgstr "Mise à jour moyenne\\tScore de validation\\tPoids maximum\n"
#: src/tarot-app/tarot_perceptron_bootstrap.c:62
msgid "learning-rate"
msgstr "taux-d-apprentissage"
#: src/tarot-app/tarot_perceptron_bootstrap.c:6
2
#: src/tarot-app/tarot_perceptron_bootstrap.c:6
3
msgid "exploration"
msgstr "exploration"
#: src/tarot-app/tarot_perceptron_bootstrap.c:8
4
#: src/tarot-app/tarot_perceptron_bootstrap.c:8
5
#, c-format
msgid ""
"Usage: tarot-perceptron-bootstrap [OPTIONS]... [HIDDEN_SIZE]...\n"
...
...
@@ -1602,14 +1607,14 @@ msgstr ""
"- -s GRAINE, --seed=GRAINE : définit la graine aléatoire. GRAINE ne\n"
" peut pas être une chaîne vide.\n"
#: src/tarot-app/tarot_perceptron_bootstrap.c:10
9
#: src/tarot-app/tarot_perceptron_bootstrap.c:1
1
0
#, c-format
msgid "Error: the learning rate should be a positive number, not '%s'.\n"
msgstr ""
"Erreur : le taux d'apprentissage doit être un nombre positif, et pas "
"« %s ».\n"
#: src/tarot-app/tarot_perceptron_bootstrap.c:12
1
#: src/tarot-app/tarot_perceptron_bootstrap.c:12
2
#, c-format
msgid ""
"Error: the exploration probability should be a probability (between 0 and "
...
...
@@ -1618,12 +1623,12 @@ msgstr ""
"Erreur : la probabilité d'exploration doit être une probabilité (entre\n"
"0 et 1), et pas « %s ».\n"
#: src/tarot-app/tarot_perceptron_bootstrap.c:13
2
#: src/tarot-app/tarot_perceptron_bootstrap.c:13
3
#, c-format
msgid "Error: the seed must not be empty.\n"
msgstr "Erreur : la graine ne doit pas être vide.\n"
#: src/tarot-app/tarot_perceptron_bootstrap.c:16
1
#: src/tarot-app/tarot_perceptron_bootstrap.c:16
2
#, c-format
msgid ""
"Error: the %d-th dimension should be a strictly positive integer, not '%s'.\n"
...
...
src/tarot-app/tarot_perceptron_bootstrap.c
View file @
1af99375
...
...
@@ -34,6 +34,7 @@ main (int argc, char *argv[])
parse_options
(
argc
,
argv
);
perceptron
=
tarot_perceptron_alloc
(
n_hidden_layers
,
hidden_sizes
,
learning_rate
);
fprintf
(
stderr
,
_
(
"Mean update
\t
Validation score
\t
Maximum weight
\n
"
));
while
(
1
)
{
self_learn
(
perceptron
);
...
...
@@ -308,8 +309,32 @@ self_learn (TarotPerceptron * perceptron)
metric
=
tarot_perceptron_validate
(
perceptron
,
game
);
if
(
!
is_empty_game
(
game
))
{
double
*
data
=
NULL
,
max_weight
=
0
;
size_t
n
=
0
,
w
;
update
=
tarot_perceptron_learn_game
(
perceptron
,
game
);
fprintf
(
stderr
,
"%g
\t
%g
\n
"
,
update
,
metric
);
tarot_perceptron_save_alloc
(
perceptron
,
&
n
,
&
data
);
for
(
w
=
0
;
w
<
n
;
w
++
)
{
if
(
w
!=
0
)
{
printf
(
"
\t
"
);
}
printf
(
"%f"
,
data
[
w
]);
if
(
data
[
w
]
>
max_weight
||
-
data
[
w
]
>
max_weight
)
{
if
(
data
[
w
]
>
max_weight
)
{
max_weight
=
data
[
w
];
}
else
{
max_weight
=
-
data
[
w
];
}
}
}
printf
(
"
\n
"
);
fprintf
(
stderr
,
"%g
\t
%g
\t
%g
\n
"
,
update
,
metric
,
max_weight
);
free
(
data
);
}
tarot_game_free
(
game
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment