tensorflow-hub
TensorFlow Hub is a library to foster the publication, discovery, and consumption of reusable parts of machine learning models.
What it is and what it does
TensorFlow Hub is a library for discovering and loading pre-trained TensorFlow SavedModels—reusable components like embeddings, classifiers, and feature extractors—into your own TensorFlow programs. It abstracts away the download and caching logic, letting you load a model with a single function call and a URL. The library depends on numpy, protobuf, and tf-keras to handle the underlying tensor operations and model serialization.
As of November 2023, the tfhub.dev repository was migrated to Kaggle Models, and many older models were deleted by March 2024. The library continues to support loading models via tfhub.dev URLs (which redirect to Kaggle), but you should verify that the models you need are still available. The package is in Beta status and has not been actively maintained since early 2024, though it remains functional for its core use case of model loading and reuse.
Use it for:
- Load a pre-trained image classifier and fine-tune it on your own dataset for transfer learning.
- Retrieve a text embedding model to convert sentences into dense vectors for semantic search or clustering.
- Integrate a pre-trained object detection model into a production inference pipeline without training from scratch.
- Prototype a machine learning application by combining multiple reusable SavedModels from the hub.
- Cache downloaded models locally to avoid repeated network requests during development and testing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Downloads and loads pre-trained TensorFlow SavedModels from TensorFlow Hub (now redirected to Kaggle Models) for reuse in TensorFlow programs with minimal code.
Yes, if you need to load pre-trained TensorFlow models and your target models are still available on Kaggle Models. The library is stable, has low install friction, and carries a permissive license. However, be aware that maintenance is dormant and many models from the original tfhub.dev have been deleted; verify your models exist before committing to this library in a new project.
Install
tensorflow-hub on PyPI
pip
pip install tensorflow-hubuv
uv add tensorflow-hubpoetry
poetry add tensorflow-hubInstalling tensorflow-hub
Before you install
Low install friction with a pure-Python wheel distribution. Maintenance is dormant—last release was January 2024 and the repository has not been updated since January 2025—but the package remains functional for downloading models that have not been deleted from Kaggle Models.
License in practice
Apache 2.0 permissive license allows commercial and private use without restriction, making it safe to include in proprietary projects.
Quickstart
pip install tensorflow-hub
import tensorflow_hub as hub
model = hub.load('https://tfhub.dev/google/...')
Requires TensorFlow and tf-keras to be installed separately; models must exist on Kaggle Models (many models from tfhub.dev were deleted as of March 18, 2024).
Verify before relying
- Current status of model availability on Kaggle Models and whether all actively-used models have been migrated.
- Whether dormant maintenance status will affect compatibility with future TensorFlow versions.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — numpy, protobuf, tf-keras |
| Maintenance | dormant — 927 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,162,619/month — #3,241 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tensorflow_hub-0.16.1-py2.py3-none-any.whl
Keywords: tensorflow, machine, learning, share, module, subgraph, component, hub, embedding, retraining, transfer
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
keras-hubKerasHub provides Keras 3 implementations of…
permissive · top 15,000 on PyPI
datasetsLoads and preprocesses datasets from the…
permissive · top 1,000 on PyPI
tensorflow-model-optimizationProvides quantization, pruning, and clustering…
permissive · top 15,000 on PyPI
tensorflow-graphicsTensorFlow Graphics provides differentiable…
permissive · top 15,000 on PyPI
tensorflowTensorFlow is an open-source machine learning…
permissive · top 5,000 on PyPI
tf-nightly-cputf-nightly-cpu provides a CPU-optimized nightly…
permissive · top 15,000 on PyPI
tf-nightlytf-nightly provides nightly builds of…
permissive · top 15,000 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
tensorflow-cpuTensorFlow CPU provides a machine learning and…
permissive · top 5,000 on PyPI
kaggleCommand-line interface to interact with…
permissive · top 5,000 on PyPI