From 6131d5b5f45677c6307203dfe572ffb9b7ac8345 Mon Sep 17 00:00:00 2001 From: Alexander Munch-Hansen Date: Thu, 10 May 2018 19:25:28 +0200 Subject: [PATCH] Added comments for Christoffer! --- network.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/network.py b/network.py index 86e0fe2..10d238f 100644 --- a/network.py +++ b/network.py @@ -307,6 +307,7 @@ class Network: list_of_moves = [] + # Prepping of data for idx, board in enumerate(boards): all_board_moves = [] for roll in all_rolls: @@ -317,14 +318,16 @@ class Network: list_of_moves.append(np.array(all_board_moves)) + print(time.time() - start) + + start = time.time() + # Running data through networks all_scores = [self.model.predict_on_batch(board) for board in list_of_moves] transformed_scores = [x if player == 1 else (1-x) for x in all_scores] scores_means = [tf.reduce_mean(score) for score in all_scores] transformed_means = [tf.reduce_mean(score) for score in transformed_scores] - print(time.time() - start) - return ([scores_means, transformed_means])