Module google/‌imagenet/‌resnet_v2_152/‌classification/1

Imagenet (ILSVRC-2012-CLS) classification with ResNet V2 152.

Module URL:


ResNet V2 is a family of network architectures for image classification with a variable number of layers. It builds on the ResNet architecture originally published by

The full preactivation 'V2' variant of ResNet used in this module was introduced by

The key difference compared to ResNet V1 is the use of batch normalization before every weight layer.

This TF-Hub module uses the TF-Slim implementation of resnet_v2_152 with 152 layers. The module contains a trained instance of the network, packaged to do the image classification that the network was trained on. If you merely want to transform images into feature vectors, use module google/imagenet/resnet_v2_152/feature_vector/1 instead, and save the space occupied by the classification layer.


The checkpoint exported into this module was resnet_v2_152_2017_04_14/resnet_v2_152.ckpt downloaded from TF-Slim's pre-trained models. Its weights were originally obtained by training on the ILSVRC-2012-CLS dataset for image classification ("Imagenet").


This module implements the common signature for image classification. It can be used like

module = hub.Module("")
height, width = hub.get_expected_image_size(module)
images = ...  # A batch of images with shape [batch_size, height, width, 3].
logits = module(images)  # Logits with shape [batch_size, num_classes].

...or using the signature name image_classification. The indices into logits are the num_classes = 1001 classes of the classification from the original training (see above).

This module can also be used to compute image feature vectors, using the signature name image_feature_vector.

For this module, the size of the input image is fixed to height x width = 224 x 224 pixels. The input images are expected to have color values in the range [0,1], following the common image input conventions.


In principle, consumers of this module can fine-tune it. However, fine-tuning through a large classification might be prone to overfit.

Fine-tuning requires importing the graph version with tag set {"train"} in order to operate batch normalization in training mode.