As noted, this code breaks the save/load functionality.
Trevor Standley

I used this monkey patch to override the function and then I am trying to save the model by adding ModelCheckpoint callback in keras. Now its throwing the error that “the model was not compiled”

File “/home/heebansa/.local/lib/python2.7/site-packages/keras/engine/”, line 1014, in _standardize_user_data
 raise RuntimeError(‘You must compile a model before ‘
RuntimeError: You must compile a model before training/testing. Use `model.compile(optimizer, loss)`.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.