Skip to content

Commit

Permalink
Tuned Model Architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
silverlightning926 committed Jun 13, 2024
1 parent 66c0070 commit e27d268
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/build_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ def build_model():
model = Sequential([
Input(shape=(8, 8, 12)),
Conv2D(64, (2, 2), activation='relu'),
MaxPooling2D((2, 2)),
Conv2D(64, (2, 2), activation='relu'),
MaxPooling2D((2, 2)),
Conv2D(64, (2, 2), activation='relu'),
Flatten(),
Dense(128, activation='relu'),
Dropout(0.2),
Dense(3, activation='softmax')
Dense(1, activation='tanh')
])

model.compile(optimizer='adam',
loss='sparse_categorical_crossentropy', metrics=['accuracy'])
loss='mean_squared_error', metrics=['accuracy'])

return model
6 changes: 3 additions & 3 deletions src/load_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ def _generateBoards():
def processRow(row):
winner = row['winner']
if winner == 'white':
winner = 2
winner = 1
elif winner == 'black':
winner = 0
winner = -1
else:
winner = 1
winner = 0

board = chess.Board()
for move in row['moves'].split():
Expand Down

0 comments on commit e27d268

Please sign in to comment.