aaparab / png2pgn

Identify chess positions from png/jpeg files containing 2D positions.
MIT License
0 stars 0 forks source link

Chessboard issue with output layer(s) #1

Open aaparab opened 4 years ago

aaparab commented 4 years ago

I'm facing a problem with how to organize the last layer. For each of the 64 squares, I need to use a softmax to identify whether the piece in that square is among empty, white king, white queen, ..., black pawn (13 possibilities). The attempt for a vanilla neural network is outlined here. You are welcome to discuss.

sgsawant commented 4 years ago

The link (see outlined here in OP) doesn't work for me.

On a related note, I would say it's better to write a small lightweight function which can tell whether the square is empty or occupied. The primary impact this will have is that more training muscle will be devoted to distinguishing between the remaining classes; information stored within the network will be more relevant to the task at hand & more distributed to the classes.

See LeCun's commentary as well. Pawns occur more frequently than most of the other pieces. The frequency probably needs to be normalized in the training datasets.

Shashank G. Sawant, PhD (352) 226-1688 sgsawant@gmail.com sgsawant@gmail.com linkedin.com/in/sgsawant

On Tue, 24 Nov 2020 at 14:39, Abhishek Parab notifications@github.com wrote:

I'm facing a problem with how to organize the last layer. For each of the 64 squares, I need to use a softmax to identify whether the piece in that square is among empty, white king, white queen, ..., black pawn (13 possibilities). The attempt for a vanilla neural network is outlined here http://./code/golf.ipynb. You are welcome to discuss.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aaparab/png2pgn/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANJ5KOPJ3D4QFAIT6BW42LSRQY3BANCNFSM4UBP4NGQ .

aaparab commented 4 years ago