fix flipY method

This commit is contained in:
2022-07-19 19:21:20 +00:00
parent c2aa53ac88
commit 80e67f41d7

View File

@@ -18,9 +18,7 @@ flipX(arr) {
}; };
flipY(arr) { flipY(arr) {
return this.flipX(arr.slice().reverse());
this.flipX(arr.slice().reverse());
} }
// Creates a 1 hot of the diff // Creates a 1 hot of the diff
showMove(first, second) { showMove(first, second) {
@@ -113,6 +111,7 @@ async trainOnGames(games, setState) {
}); });
// Tensorfy! // Tensorfy!
console.log(AllX);
const stackedX = tf.stack(AllX); const stackedX = tf.stack(AllX);
const stackedY = tf.stack(AllY); const stackedY = tf.stack(AllY);
await this.trainModel(model, stackedX, stackedY); await this.trainModel(model, stackedX, stackedY);