TensorFlow Hub is a repository of trained machine learning models.
!pip install --upgrade tensorflow_hub import tensorflow_hub as hub model = hub.KerasLayer("https://tfhub.dev/google/nnlm-en-dim128/2") embeddings = model(["The rain in Spain.", "falls", "mainly", "In the plain!"]) print(embeddings.shape) #(4,128)
TensorFlow Hub is a repository of trained machine learning models ready for fine-tuning and deployable anywhere. Reuse trained models like BERT and Faster R-CNN with just a few lines of code.
-
See the guide
Learn about how to use TensorFlow Hub and how it works. -
See tutorials
Tutorials show you end-to-end examples using TensorFlow Hub. -
See models
Find trained TF, TFLite, and TF.js models for your use case.
Models
Find trained models from the TensorFlow community on TFHub.dev
BERT
Check out BERT for NLP tasks including text classification and question answering.
Object detection
Use the Faster R-CNN Inception ResNet V2 640x640 model for detecting objects in images.
Style transfer
Transfer the style of one image to another using the image style transfer model.
On-device food classifier
Use this TFLite model to classify photos of food on a mobile device.
News & announcements
Check out our blog for more announcements and view the latest #TFHub updates on Twitter
TensorFlow Hub for Real World Impact at Google I/O
Learn how you can use TensorFlow Hub to build ML solutions with real world impact.
On-device ML solutions
To explore ML solutions for your mobile and web apps including TensorFlow Hub, visit the Google on-device machine learning page.
Making BERT Easier with Preprocessing Models From TensorFlow Hub
TensorFlow Hub makes BERT simple to use with new preprocessing models.
From singing to musical scores: Estimating pitch with SPICE and Tensorflow Hub
Learn how to use the SPICE model to automatically transcribe sheet music from live audio.
Community
Join the TensorFlow Hub community