Deploy TensorFlow graphs for fast evaluation and export to environments without TensorFlow, using NumPy.
tfdeploy is a Python library that converts trained TensorFlow models into portable formats for deployment in environments without TensorFlow. It allows fast model evaluation using only NumPy, solving the problem of deploying machine learning models where TensorFlow cannot be installed. The library focuses on lightweight, performant inference by translating TensorFlow graphs into NumPy operations.
Machine learning engineers and data scientists who need to deploy TensorFlow models in production environments where TensorFlow is unavailable or where minimal dependencies are required.
Developers choose tfdeploy for its simplicity, portability, and performance—it eliminates TensorFlow dependencies, often runs faster than native TensorFlow evaluation, and provides an easy-to-understand reference implementation of TensorFlow kernels.
Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows running trained models without TensorFlow installed, relying solely on NumPy, which simplifies deployment in constrained environments like serverless or embedded systems.
Core code is under 150 lines in a single file, making it easy to copy and integrate into projects without heavy dependencies, as highlighted in the README.
Often faster than TensorFlow's native Tensor.eval for many graphs, demonstrated in performance comparisons showing significant speedups for vectorized operations.
Supports writing custom NumPy-based operations by inheriting from tfdeploy.Operation, enabling flexibility for unsupported or specialized ops.
Provides an Ensemble class to combine multiple models with methods like mean, max, min, or custom logic, useful for advanced inference scenarios.
The project is explicitly stated as no longer actively maintained, meaning it won't receive updates, bug fixes, or compatibility with newer TensorFlow versions.
Relies solely on CPU-based NumPy computations and cannot leverage GPU acceleration, limiting performance for large-scale or real-time inference tasks.
As a reference implementation, it doesn't keep pace with TensorFlow's rapid development, potentially missing newer or complex operations, which the README admits.
Requires TensorFlow to be installed during the model conversion phase, which might be a barrier if TensorFlow is unavailable in the development environment.