lczero_training
Описание
Языки
- Jupyter Notebook55,9%
- Python43,9%
- Shell0,2%
Training
The training pipeline resides in , this requires tensorflow running on linux (Ubuntu 16.04 in this case). (It can be made to work on windows too, but it takes more effort.)
Installation
Install the requirements under . And call to compile the protobuf files.
Data preparation
In order to start a training session you first need to download training data from https://storage.lczero.org/files/training_data/. Several chunks/games are packed into a tar file, and each tar file contains an hour worth of chunks. Preparing data requires the following steps:
wget https://storage.lczero.org/files/training_data/training-run1--20200711-2017.tar
tar -xzf training-run1--20200711-2017.tar
Training pipeline
Now that the data is in the right format one can configure a training pipeline. This configuration is achieved through a yaml file, see :
The configuration is pretty self explanatory, if you're new to training I suggest looking at the machine learning glossary by google. Now you can invoke training with the following command:
This will initialize the pipeline and start training a new neural network. You can view progress by invoking tensorboard:
If you now point your browser at localhost:6006 you'll see the trainingprogress as the trainingsteps pass by. Have fun!
Restoring models
The training pipeline will automatically restore from a previous model if it exists in your as configured by your yaml config. For initializing from a raw file you can use , this will create a checkpoint for you.
Supervised training
Generating trainingdata from pgn files is currently broken and has low priority, feel free to create a PR.