age-gender-estimation icon indicating copy to clipboard operation
age-gender-estimation copied to clipboard

How to re-traning when stop

Open khaidox opened this issue 3 years ago • 1 comments

I have run code "train.py". But I stop it. I wonder if I can how to re-train with the latest checkpoint? Please help me.

khaidox avatar Jun 09 '21 17:06 khaidox

You can modify the training code by adding

model.load_weights(weight_file)

before

model.fit()

This will restore the weights from the checkpoint file, but do be aware of the learning rate as the original learning rate decays in the later epochs, so by restarting the training from epoch 0 with the already trained weights, you might have to make some modifications.

vjsyong avatar Jul 05 '21 06:07 vjsyong