Skip to main content

ResNet variations for TensorFlow.

Project description


This repository contains TensorFlow Keras ResNet models. Below, you will find the supported variants of ResNet and what weights are supported.

The codebase takes inspiration from TensorFlow ResNets and PyTorch ResNets.

This repository is compatible with TF 2.2.0 even though grouped convolutions are only supported in TF Nightly. Grouped convolutions will be imported from which is the TF Nightly version of convolution layers. This allows the use of TPUs since they don't work with TF Nightly.

These models will not work without a GPU or TPU due to the use of grouped convolutions.


Architecture Weights Top-1 Acc. Top-5 Acc.
ResNeXt-50 32x4d ImageNet 77.6 93.7
ResNeXt-101 32x8d ImageNet 79.3 94.5
Wide ResNet-50 2 ImageNet 78.5 94.1
Wide ResNet-101 2 ImageNet 78.8 94.3
ResNeXt-50 32x4d semi-supervised 80.3 95.4
ResNeXt-101 32x8d semi-supervised 81.7 96.1
ResNeXt-50 32x4d semi-weakly supervised 82.2 96.3
ResNeXt-101 32x8d semi-weakly supervised 84.3 97.2


There are two different preprocessing functions which are meant to be used according to the task at hand. The first one, located in, is meant to be used for reproducing the ImageNet results. The second function is located inside This function is meant to be used for transfer learning. The first function includes an additional resize to 256 by 256 and a central crop to 224 by 224.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tf2-resnets-0.1.0.tar.gz (22.9 kB view hashes)

Uploaded source

Built Distribution

tf2_resnets-0.1.0-py3-none-any.whl (23.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page