hlamba28 / Automatic-Image-Captioning

Generating Captions for images using Deep Learning
https://towardsdatascience.com/image-captioning-with-keras-teaching-computers-to-describe-pictures-c88a46a311b8
120 stars 80 forks source link

changing learning rate after 20 epochs error #6

Open vipul43 opened 4 years ago

vipul43 commented 4 years ago

code uses a direct method to change the learning rate of the model to 0.0001 which raises an error for reason unknown. A quick fix would be to use keras backend functionality to change the learning rate. Instead of model.optimizer.lr = 0.0001 use K.set_value(model.optimizer.lr, 0.0001) after importing keras.backend as K