fix: create result file

This commit is contained in:
Martin Eyben 2025-05-16 11:15:27 +02:00
parent d98a817d51
commit bc67103752

View File

@ -236,10 +236,13 @@ def stones_to_board(black_stones, white_stones, black_plays):
def position_predict(black_stones, white_stones, depth):
board = stones_to_board(black_stones, white_stones, depth % 2 == 0)
board = torch.from_numpy(np.array([
stones_to_board(black_stones, white_stones, depth % 2 == 0)
])).float().to(device)
mymodel.eval()
with torch.no_grad():
prediction = mymodel(board.unsqueeze(0))
prediction = mymodel(board)
return prediction
@ -310,6 +313,7 @@ if __name__ == "__main__":
with gzip.open(args.R) as fz:
data = json.loads(fz.read().decode("utf-8"))
create_result_file(data)
exit(0)
if args.t is not None and args.T is not None:
trainset = torch.load(args.t)