#183 · Primary category: Inference & Local Deploy

keras_to_tensorflow

deep-learning keras machine-learning python tensorflow

General code to convert a trained keras model into an inference tensorflow model

Project last updated:11/23/20

GitHub Stars

1.6K

Forks

524

Contributors

6

License

MIT

Why we included this project

Teams that trained a model in Keras but need to serve it as plain TensorFlow often hit an awkward gap, and this small tool bridges it. It freezes a trained model into a single .pb file: variables become constants, dead nodes are pruned from the inference graph, and the result loads without the original training graph. The command-line flags cover the deployment details you would otherwise script yourself, such as renaming output tensors for networks with multiple outputs, exporting checkpoints and metagraphs so training can continue, and quantizing weights. The README is honest about its age: the tool targets the TensorFlow 1.x era and is not tailored for TensorFlow 2.0. If you still maintain an older Keras pipeline and want a repeatable path from .h5 to a frozen graph, this saves you writing that freezing boilerplate by hand.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category