skillfed

tensorflow-hub

TensorFlow Hub is a library to foster the publication, discovery, and consumption of reusable parts of machine learning models.

tensorflow-hub v0.16.1 2.2M downloads/30d#3,241 on PyPI3,523
Permissive license Apache 2.0 DORMANT released

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-hub

uv

uv add tensorflow-hub

poetry

poetry add tensorflow-hub

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

tensorflow model hub downloadload pretrained tensorflow modelstransfer learning tensorflowreusable savedmodels tensorflowtensorflow model reuse librarydownload tensorflow hub modelstensorflow model serving
transfer-learningmodel-reusetensorflow

More Software Development packages