From 80e67f41d77d164651b0d34b38b4c4d1e07d18f8 Mon Sep 17 00:00:00 2001 From: David Tahir Date: Tue, 19 Jul 2022 19:21:20 +0000 Subject: [PATCH] fix flipY method --- src/app/ai.service.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/ai.service.ts b/src/app/ai.service.ts index aa2d45e..51c6ee7 100644 --- a/src/app/ai.service.ts +++ b/src/app/ai.service.ts @@ -18,9 +18,7 @@ flipX(arr) { }; flipY(arr) { - - - this.flipX(arr.slice().reverse()); + return this.flipX(arr.slice().reverse()); } // Creates a 1 hot of the diff showMove(first, second) { @@ -113,6 +111,7 @@ async trainOnGames(games, setState) { }); // Tensorfy! + console.log(AllX); const stackedX = tf.stack(AllX); const stackedY = tf.stack(AllY); await this.trainModel(model, stackedX, stackedY);