OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Keras To Tensorflow

Keras To Tensorflow is a Python command-line tool that converts a trained Keras model into a TensorFlow inference graph saved as a binary protobuf file. Its default conversion freezes variables into constants and prunes nodes that do not contribute to the output tensor. It also supports multiple output networks, output-tensor renaming, and optional checkpoint and metagraph export for continued training.

Independent OpenViST project profile, based on linked sources.

Keras To Tensorflow — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. For a single-file model, provide its path with --input_model and a destination with --output_model.

  2. 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.

  3. 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

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.

ProjectDocumented purposePlatformAccess and requirements
Keras To TensorflowConvert a saved Keras model into a frozen TensorFlow protobuf inference graph.CLIThe repository is public and identifies an MIT license. Its README lists Python dependencies: keras, tensorflow, absl and pathlib.
HyperposeCustomize pose-estimation architectures and datasets.Docker, Linux, macOS, Windows
Multi Task NlpDefine multiple tasks and their data and model settings in a YAML file.Linux, macOS, WindowsThe project is an open-source library under the Apache-2.0 license, distributed through its public GitHub repository.
Evidence and transparency

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