2
votes

I am training the Mask R-CNN model.

I saved the weights after training for 2 epochs the 'head' and I want to continue from epoch three. But the model.train() function does not have initial_epoch argument as model.fit in a Sequential model for example.

I have the following code but if I run it with the loaded weights it starts from the first epoch and I don't want that:

EPOCHS = [1, 3, 5, 8]  

model.train(dataset_train, dataset_val,
                learning_rate = LEARNING_RATE,
                epochs = EPOCHS[1],
                layers = 'all',
                augmentation = augmentation)

I would appreciate if someone can tell me what is the substitute for initial_epoch in my case.

1

1 Answers

2
votes

After first 2 epochs of fitting your model changed its weights. So, when you call fit once again the model will continue training. Your progress won't lost