backgammon/network_test.py

33 lines
639 B
Python
Raw Normal View History

2018-03-04 16:35:36 +00:00
from network import Network
import tensorflow as tf
import random
import numpy as np
session = tf.Session()
graph_lol = tf.Graph()
network = Network(session)
initial_state = np.array(( 0,
2, 0, 0, 0, 0, -5,
0, -3, 0, 0, 0, 5,
-5, 0, 0, 0, 3, 0,
5, 0, 0, 0, 0, -2,
0 )).reshape((1,26))
#print(x.shape)
with graph_lol.as_default():
session_2 = tf.Session(graph = graph_lol)
network_2 = Network(session_2)
network_2.restore_model()
print(network_2.eval_state(initial_state))
print(network.eval_state(initial_state))