Skip to content

Commit

Permalink
Create network.py
Browse files Browse the repository at this point in the history
  • Loading branch information
phuang1024 committed Mar 25, 2021
1 parent 1a3aa1a commit a85cf26
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions supervised/network.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# Eval Network
# Testing neural network evaluation.
# Copyright Megalodon Chess 2021
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

import os
import numpy as np
import tensorflow as tf
from tensorflow.keras import layers

PARENT = os.path.dirname(os.path.realpath(__file__))
PATH = os.path.join(PARENT, "out.dat")


positions = []
evals = []
with open(PATH, "rb") as file:
while True:
pos = file.read(64)
if len(pos) < 64:
break
ev = file.read(4)
if len(ev) < 4:
break

0 comments on commit a85cf26

Please sign in to comment.