Why we use Pickle instead of saving the weights in HDF5 format in Deep Learning
Avoid pickle, there are a couple of problems
Even in keras documentation they say
&quot;It is not recommended to use pickle or cPickle to save a Keras model.&quot;
Also look at this solution.