Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Enzo Durand
AlphaZeroICGA
Commits
d6e80083
Commit
d6e80083
authored
Jul 10, 2022
by
hanzopgp
Browse files
fix bug
parent
d4248ba8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/src_python/brain/train_model.py
View file @
d6e80083
...
...
@@ -19,7 +19,7 @@ if __name__ == '__main__':
X
,
y_values
,
y_opp_values
,
y_distrib
=
load_data
()
X
,
y_values
,
y_opp_values
,
y_distrib
=
get_random_sample
(
X
,
y_values
,
y_opp_values
,
y_distrib
)
X
=
X
.
astype
(
"float32"
)
y
=
{
"value_head"
:
y_values
.
astype
(
"float32"
),
"value_opp_head"
:
y_opp_values
.
astype
(
"float32"
),
"policy_head"
:
y_distrib
.
flatten
(
).
astype
(
"float32"
)}
y
=
{
"value_head"
:
y_values
.
astype
(
"float32"
),
"value_opp_head"
:
y_opp_values
.
astype
(
"float32"
),
"policy_head"
:
y_distrib
.
reshape
(
y_distrib
.
shape
[
0
],
-
1
).
astype
(
"float32"
)}
champion_path
=
MODEL_PATH
+
GAME_NAME
+
"_"
+
"champion"
+
".h5"
outsider_path
=
MODEL_PATH
+
GAME_NAME
+
"_"
+
"outsider"
+
".h5"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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