Skip to content
Fabian Fichter edited this page Apr 12, 2022 · 19 revisions

Training example

The training command works the same as for the official trainer, e.g.,

python train.py --threads 1 --num-workers 1 --gpus 1 --max_epochs 10 training_data.bin validation_data.bin
  • --max_epochs: number of epochs for training. One epoch is 20M positions, so choose the number of epochs according to the amount of training data. E.g., for 200M positions in the training_data.bin file --max_epochs should be 10 (or slightly above).

Resume from existing NNUE net

If you want to continue training from an existing network, you need to first serialize it:

python serialize.py --features='HalfKAv2' somevariantnet.nnue startingpointfortraining.pt

Then, when running the training, you need to specify the serialized network as input to resume from:

python train.py --resume-from-model startingpointfortraining.pt ...

Converting a training checkpoint to NNUE file

python serialize.py logs/default/version_0/checkpoints/last.ckpt yourvariant.nnue
Clone this wiki locally