### Sidebar

#### Release history

pipeline:window:cryolo:training

This is an old revision of the document!

Now you are ready to train the model. In case you have multiple GPUs, you should first select a free GPU. The following command will show the status of all GPUs:

nvidia-smi

For this tutorial, we assume that you have either a single GPU or want to use GPU 0. In the GUI you have to fille the mandatory fields:

The default number of warmup epochs is fine as long you don't want to refine an existing model. During the warmup training epochs it will not try to estimate the size of your particle, which helps crYOLO to converge.

Before you start the training, you might want to change the GPU. By default, crYOLO will use GPU 0. The following command will show the status of all GPUs:
nvidia-smi

In “Optional arguments” tab you can change the GPU that should be used by crYOLO. If you have multiple (e.g GPU 0 and GPU 1) you could also use both by set the GPU argument to '0 1'.

When you start the training, it will stop when the “loss” metric on the validation data does not improve 10 times in a row. This is typically enough. In case want to give the training more time to find the best model you might want to increase the “not changed in a row” parameter to, for example, 15 by setting the early argument in the “Optional arguments” to 15.

Now press the Start button to start the training. The final model will be written to disk as specified in saved_weights_name in your configuration file.

Train crYOLO using the command line

Train crYOLO using the command line

Navigate to the folder with config_cryolo.json file, train_image folder, etc.

Train your network with 5 warmup epochs in GPU 0:

cryolo_train.py -c config.json -w 5 -g 0

The final model file will be written to disk.

cryolo_train.py -c config.json -w 3 -g 0 -e 15

to the training command.