I want to change loss function for every alternative epoch or every 5 epochs. I tried using loss wrapper method suggested in this. This didn't work. It is keeping current_epoch value initialized forever and updated value is not coming in the loss wrapper function although this variable is updated for every epoch end in the on_epoch_end callback.
And also I tried using model.add_loss method in on_epoch_end callback. This is also not working. It takes only the loss function whatever is initialized in model.compile. It doesn't take the loss function passed in model.add_loss.