Added comments for Christoffer!

This commit is contained in:
Alexander Munch-Hansen 2018-05-10 19:25:28 +02:00
parent 1aedc23de1
commit 6131d5b5f4

View File

@ -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])