Note that the model weights may have different scoped names after being
loaded. Scoped names include the model/layer names, such as
"dense_1/kernel:0". It is recommended that you use the layer properties to
access specific variables, e.g.model.get_layer("dense_1").kernel`.
One of the following:
String or pathlib.Path object, path to the saved model
h5py.File object from which to load the model
Optional dictionary mapping names
(strings) to custom classes or functions to be
considered during deserialization.
Boolean, whether to compile the model
A Keras model instance. If the original model was compiled, and saved with
the optimizer, then the returned model will be compiled. Otherwise, the
model will be left uncompiled. In the case that an uncompiled model is
returned, a warning is displayed if the compile argument is set to
if loading from an hdf5 file and h5py is not available.