ahmed_lone:

okay soo from what u said i understand i don’t have a right h5 file?


I thought it meant the file was broken, but it looks like I was wrong about that.
%debug  opens to that f.close() line.
But if you want figure out what’s wrong with that file try:
f = h5py.File(filepath, mode='r')

and then inspect that f and f.attrs. it’s supposed to have a model_config attribute.

model_config.json

Have you tried: keras.models.model_from_json 1?