1
$\begingroup$

I use Mask RCNN for object detection and instance segmentation. I am new to neural networks, this is my first project.

I use jupyter notebook. Can I continue learning after shutdown? enter image description here

I would like start learning from 6 epoch. How can I do it? One epoch ~ 1h. I don't want to waste time, and continue this process. Is it possible?

$\endgroup$

1 Answer 1

1
$\begingroup$

In order to continue the learning process, you will need to use checkpoints.

# source: https://stackoverflow.com/questions/36356004/continue-training-from-a-specific-epoch
weight_save_callback = ModelCheckpoint('/path/to/weights.{epoch:02d}-{val_loss:.2f}.hdf5', monitor='val_loss', verbose=0, save_best_only=False, mode='auto')
model.fit(X_train,y_train,batch_size=batch_size,nb_epoch=nb_epoch,callbacks=[weight_save_callback])

# load model
model = Sequential()
model.add(...)
model.load('path/to/weights.hf5')

# use model.fit to continue training.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.