Skip to content

Latest commit

 

History

History
177 lines (127 loc) · 7.96 KB

README.md

File metadata and controls

177 lines (127 loc) · 7.96 KB

TensorFlow Official Models

The TensorFlow official models are a collection of models that use TensorFlow’s high-level APIs. They are intended to be well-maintained, tested, and kept up to date with the latest TensorFlow API.

They should also be reasonably optimized for fast performance while still being easy to read. These models are used as end-to-end tests, ensuring that the models run with the same or improved speed and performance with each new TensorFlow build.

The API documentation of the latest stable release is published to tensorflow.org.

More models to come!

The team is actively developing new models. In the near future, we will add:

  • State-of-the-art language understanding models.
  • State-of-the-art image classification models.
  • State-of-the-art object detection and instance segmentation models.
  • State-of-the-art video classification models.

Table of Contents

Models and Implementations

Image Classification

Model Reference (Paper)
ResNet Deep Residual Learning for Image Recognition
ResNet-RS Revisiting ResNets: Improved Training and Scaling Strategies
EfficientNet EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
Vision Transformer An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale

Object Detection and Segmentation

Model Reference (Paper)
RetinaNet Focal Loss for Dense Object Detection
Mask R-CNN Mask R-CNN
YOLO YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
SpineNet SpineNet: Learning Scale-Permuted Backbone for Recognition and Localization
Cascade RCNN-RS and RetinaNet-RS Simple Training Strategies and Model Scaling for Object Detection

Video Classification

Model Reference (Paper)
Mobile Video Networks (MoViNets) MoViNets: Mobile Video Networks for Efficient Video Recognition

Pre-trained Language Model

Model Reference (Paper)
ALBERT ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
BERT BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
ELECTRA ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators

Neural Machine Translation

Model Reference (Paper)
Transformer Attention Is All You Need

Natural Language Generation

Model Reference (Paper)
NHNet (News Headline generation model) Generating Representative Headlines for News Stories

Knowledge Distillation

Model Reference (Paper)
MobileBERT MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices

Recommendation

Model Reference (Paper)
DLRM Deep Learning Recommendation Model for Personalization and Recommendation Systems
DCN v2 Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems
NCF Neural Collaborative Filtering

How to get started with the official models

  • The official models in the master branch are developed using master branch of TensorFlow 2. When you clone (the repository) or download (pip binary) master branch of official models , master branch of TensorFlow gets downloaded as a dependency. This is equivalent to the following.
pip3 install tf-models-nightly
pip3 install tensorflow-text-nightly # when model uses `nlp` packages
  • Incase of stable versions, targeting a specific release, Tensorflow-models repository version numbers match with the target TensorFlow release. For example, TensorFlow-models v2.8.x is compatible with TensorFlow v2.8.x. This is equivalent to the following:
pip3 install tf-models-official==2.8.0
pip3 install tensorflow-text==2.8.0 # when models in uses `nlp` packages

Starting from 2.9.x release, we release the modeling library as tensorflow_models package and users can import tensorflow_models directly to access to the exported symbols. If you are using the latest nightly version or github code directly, please follow the docstrings in the github.

Please follow the below steps before running models in this repository.

Requirements

  • The latest TensorFlow Model Garden release and the latest TensorFlow 2
    • If you are on a version of TensorFlow earlier than 2.2, please upgrade your TensorFlow to the latest TensorFlow 2.
  • Python 3.7+

Our integration tests run with Python 3.7. Although Python 3.6 should work, we don't recommend earlier versions.

Installation

Please check here for the instructions.

Available pypi packages:

Examples and Tutorials

Get started with TensorFlow Model Garden by exploring the provided examples and tutorials:

Contributions

If you want to contribute, please review the contribution guidelines.