How to import trained keras models I have some trained models that I could import and compare, but then the same code gave:

"WARNING tensorflow:From 'where its saved' colocate with (from tensorflow.python.framework.ops)
  is deprecated and will be removed in a future version.
Instructions for updating:
  Colocations handled automatically by placer."


As well as 2 other deprecation warnings.

The code that I am using to import the models is: 

"model_1 = load_model("filepath\\filename.h5")"


Restating my computer fixed the issue, but I'm curious as to why this happened, if anyone can explain.
I am afraid if you had saved the model in your drive rather google collab directory as it will lost after run-time session interrupt.

model_new = load_model('BestModelWeights.hdf5')  # will load model , if BestModelWeights file  exist in collab directory --which i feel lost in your case that could be the reason you are getting "where it saved" error.

I would advise use google drive to save weights and directly load weight file when you need.For this you need to follow two steps 


Mount google drive and authenticate collab.

from google.colab import drive
drive.mount('/content/drive')
Load model

model_new = load_model('/content/drive/My Drive/BestModelWeights.hdf5')


and you can play with your new loaded Model.

hope it helps.
JSH