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