简体   繁体   中英

Load tensorflow checkpoint as keras model

I have an old model defined and trained using tensorflow, and now I would like to work on it but I'm currently using Keras for everything.

So the question is: is it possible to load a tf cehckpoint (with *.index, *.meta etc..) into a Keras model?

I am aware of old questions like: How can I convert a trained Tensorflow model to Keras? .

I am hoping that after 2 years, and with keras being included into tf, there would be a easier way to do it now.

Unfortunately I don't have the original model definition in tf; I may be able to find it, but it would be nicer if it wasn't necessary.

Thanks!

In the below link, which is the official TensorFlow tutorial, the trained model is saved and it has .ckpt extension. After, it is loaded and is used with Keras model.

I think it might help you.

https://www.tensorflow.org/tutorials/keras/save_and_restore_models

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM