Practical overview
When it fits
Use it when a trained Keras model needs to be converted into a frozen TensorFlow inference graph, or when the conversion workflow also needs its documented multiple-output or checkpoint/metagraph options.
Who it is for
- Machine-learning developers preparing trained Keras models for TensorFlow inference.
- Developers working with Keras models saved as a combined model file or separate weights and architecture files.
Documented uses
- Convert a saved Keras model into a frozen TensorFlow protobuf inference graph.
- Prepare a graph with multiple outputs and rename output tensors.
- Export checkpoint and metagraph files for a workflow that continues training with TensorFlow's tf.train.Saver.
Requirements & limits
The repository is public and identifies an MIT license. Its README lists Python dependencies: keras, tensorflow, absl and pathlib.
- The tool accepts a single .h5 or .hdf5 model file, or separate weights and JSON architecture files.
- Freezing and node pruning are the default behavior.
- Multiple output networks and output-tensor renaming are supported.
- Checkpoint and metagraph export is optional and intended to support continued training with tf.train.Saver.
- The README cautions that the tool is not tailored for TensorFlow 2.0, while stating that it appears to work with it.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Convert a saved Keras model to a TensorFlow protobuf graph
Prepare a trained Keras model as a frozen TensorFlow inference model.
Before you start
- Python command-line environment with keras, tensorflow, absl and pathlib installed.
- A Keras model saved as one .h5 or .hdf5 file, or a weights .h5/.hdf5 file plus a JSON architecture file.
- The keras_to_tensorflow.py script from the repository.
Steps
For a single-file model, provide its path with --input_model and a destination with --output_model.
For separate weights and architecture files, provide the weights with --input_model, the architecture JSON with --input_model_json, and a destination with --output_model.
Run the documented Python command for the selected input format; the default conversion freezes variables and saves the inference graph and weights in a binary .pb file.
Expected outcome
A TensorFlow protobuf inference model; the default conversion also prunes nodes that do not contribute to the output tensor.
Guide limitations
- The README says the tool is not tailored for TensorFlow 2.0, though it appears to work with it.
- The repository documents conversion and output options, not a validation procedure for the resulting graph.
Compare options for Model inference and serving
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Keras To Tensorflow | Convert a saved Keras model into a frozen TensorFlow protobuf inference graph. | CLI | The repository is public and identifies an MIT license. Its README lists Python dependencies: keras, tensorflow, absl and pathlib. |
| Hyperpose | Customize pose-estimation architectures and datasets. | Docker, Linux, macOS, Windows | |
| Multi Task Nlp | Define multiple tasks and their data and model settings in a YAML file. | Linux, macOS, Windows | The project is an open-source library under the Apache-2.0 license, distributed through its public GitHub repository. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- amir-abdi/keras_to_tensorflow · Official homepage title · retained in its source language

