Resume training with different loss function
问题 I want to implement a two-step learning process where: 1) pre-train a model for a few epochs using the loss function loss_1 2) change the loss function to loss_2 and continue the training for fine-tuning Currently, my approach is: model.compile(optimizer=opt, loss=loss_1, metrics=['accuracy']) model.fit_generator(…) model.compile(optimizer=opt, loss=loss_2, metrics=['accuracy’]) model.fit_generator(…) Note that the optimizer remains the same, and only the loss function changes. I'd like to