Gluon Model Zoo

Overview

This document lists the model APIs in Gluon:

mxnet.gluon.model_zoo Predefined and pretrained models.
mxnet.gluon.model_zoo.vision Module for pre-defined neural network models.

The Gluon Model Zoo API, defined in the gluon.model_zoo package, provides pre-defined and pre-trained models to help bootstrap machine learning applications.

In the rest of this document, we list routines provided by the gluon.model_zoo package.

Vision

Module for pre-defined neural network models.

This module contains definitions for the following model architectures: - AlexNet - DenseNet - Inception V3 - ResNet V1 - ResNet V2 - SqueezeNet - VGG - MobileNet - MobileNetV2

You can construct a model with random weights by calling its constructor:

from mxnet.gluon.model_zoo import vision
resnet18 = vision.resnet18_v1()
alexnet = vision.alexnet()
squeezenet = vision.squeezenet1_0()
densenet = vision.densenet_161()

We provide pre-trained models for all the listed models. These models can constructed by passing pretrained=True:

from mxnet.gluon.model_zoo import vision
resnet18 = vision.resnet18_v1(pretrained=True)
alexnet = vision.alexnet(pretrained=True)

All pre-trained models expect input images normalized in the same way, i.e. mini-batches of 3-channel RGB images of shape (N x 3 x H x W), where N is the batch size, and H and W are expected to be at least 224. The images have to be loaded in to a range of [0, 1] and then normalized using mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225]. The transformation should preferrably happen at preprocessing. You can use mx.image.color_normalize for such transformation:

image = image/255
normalized = mx.image.color_normalize(image,
                                      mean=mx.nd.array([0.485, 0.456, 0.406]),
                                      std=mx.nd.array([0.229, 0.224, 0.225]))

The following table summarizes the available models.

Alias Network # Parameters Top-1 Accuracy Top-5 Accuracy Origin
alexnet AlexNet 61,100,840 0.5492 0.7803 Converted from pytorch vision
densenet121 DenseNet-121 8,062,504 0.7497 0.9225 Converted from pytorch vision
densenet161 DenseNet-161 28,900,936 0.7770 0.9380 Converted from pytorch vision
densenet169 DenseNet-169 14,307,880 0.7617 0.9317 Converted from pytorch vision
densenet201 DenseNet-201 20,242,984 0.7732 0.9362 Converted from pytorch vision
inceptionv3 Inception V3 299x299 23,869,000 0.7755 0.9364 Converted from pytorch vision
mobilenet0.25 MobileNet 0.25 475,544 0.5185 0.7608 Trained with script
mobilenet0.5 MobileNet 0.5 1,342,536 0.6307 0.8475 Trained with script
mobilenet0.75 MobileNet 0.75 2,601,976 0.6738 0.8782 Trained with script
mobilenet1.0 MobileNet 1.0 4,253,864 0.7105 0.9006 Trained with script
mobilenetv2_1.0 MobileNetV2 1.0 3,539,136 0.7192 0.9056 Trained with script
mobilenetv2_0.75 MobileNetV2 0.75 2,653,864 0.6961 0.8895 Trained with script
mobilenetv2_0.5 MobileNetV2 0.5 1,983,104 0.6449 0.8547 Trained with script
mobilenetv2_0.25 MobileNetV2 0.25 1,526,856 0.5074 0.7456 Trained with script
resnet18_v1 ResNet-18 V1 11,699,112 0.7093 0.8992 Trained with script
resnet34_v1 ResNet-34 V1 21,814,696 0.7437 0.9187 Trained with script
resnet50_v1 ResNet-50 V1 25,629,032 0.7647 0.9313 Trained with script
resnet101_v1 ResNet-101 V1 44,695,144 0.7834 0.9401 Trained with script
resnet152_v1 ResNet-152 V1 60,404,072 0.7900 0.9438 Trained with script
resnet18_v2 ResNet-18 V2 11,695,796 0.7100 0.8992 Trained with script
resnet34_v2 ResNet-34 V2 21,811,380 0.7440 0.9208 Trained with script
resnet50_v2 ResNet-50 V2 25,595,060 0.7711 0.9343 Trained with script
resnet101_v2 ResNet-101 V2 44,639,412 0.7853 0.9417 Trained with script
resnet152_v2 ResNet-152 V2 60,329,140 0.7921 0.9431 Trained with script
squeezenet1.0 SqueezeNet 1.0 1,248,424 0.5611 0.7909 Converted from pytorch vision
squeezenet1.1 SqueezeNet 1.1 1,235,496 0.5496 0.7817 Converted from pytorch vision
vgg11 VGG-11 132,863,336 0.6662 0.8734 Converted from pytorch vision
vgg13 VGG-13 133,047,848 0.6774 0.8811 Converted from pytorch vision
vgg16 VGG-16 138,357,544 0.7323 0.9132 Trained with script
vgg19 VGG-19 143,667,240 0.7411 0.9135 Trained with script
vgg11_bn VGG-11 with batch normalization 132,874,344 0.6859 0.8872 Converted from pytorch vision
vgg13_bn VGG-13 with batch normalization 133,059,624 0.6884 0.8882 Converted from pytorch vision
vgg16_bn VGG-16 with batch normalization 138,374,440 0.7310 0.9176 Trained with script
vgg19_bn VGG-19 with batch normalization 143,689,256 0.7433 0.9185 Trained with script
get_model Returns a pre-defined model by name

ResNet

resnet18_v1 ResNet-18 V1 model from “Deep Residual Learning for Image Recognition” paper.
resnet34_v1 ResNet-34 V1 model from “Deep Residual Learning for Image Recognition” paper.
resnet50_v1 ResNet-50 V1 model from “Deep Residual Learning for Image Recognition” paper.
resnet101_v1 ResNet-101 V1 model from “Deep Residual Learning for Image Recognition” paper.
resnet152_v1 ResNet-152 V1 model from “Deep Residual Learning for Image Recognition” paper.
resnet18_v2 ResNet-18 V2 model from “Identity Mappings in Deep Residual Networks” paper.
resnet34_v2 ResNet-34 V2 model from “Identity Mappings in Deep Residual Networks” paper.
resnet50_v2 ResNet-50 V2 model from “Identity Mappings in Deep Residual Networks” paper.
resnet101_v2 ResNet-101 V2 model from “Identity Mappings in Deep Residual Networks” paper.
resnet152_v2 ResNet-152 V2 model from “Identity Mappings in Deep Residual Networks” paper.
ResNetV1 ResNet V1 model from “Deep Residual Learning for Image Recognition” paper.
ResNetV2 ResNet V2 model from “Identity Mappings in Deep Residual Networks” paper.
BasicBlockV1 BasicBlock V1 from “Deep Residual Learning for Image Recognition” paper.
BasicBlockV2 BasicBlock V2 from “Identity Mappings in Deep Residual Networks” paper.
BottleneckV1 Bottleneck V1 from “Deep Residual Learning for Image Recognition” paper.
BottleneckV2 Bottleneck V2 from “Identity Mappings in Deep Residual Networks” paper.
get_resnet ResNet V1 model from “Deep Residual Learning for Image Recognition” paper.

Alexnet

alexnet AlexNet model from the “One weird trick...” paper.
AlexNet AlexNet model from the “One weird trick...” paper.

DenseNet

densenet121 Densenet-BC 121-layer model from the “Densely Connected Convolutional Networks” paper.
densenet161 Densenet-BC 161-layer model from the “Densely Connected Convolutional Networks” paper.
densenet169 Densenet-BC 169-layer model from the “Densely Connected Convolutional Networks” paper.
densenet201 Densenet-BC 201-layer model from the “Densely Connected Convolutional Networks” paper.
DenseNet Densenet-BC model from the “Densely Connected Convolutional Networks” paper.

SqueezeNet

squeezenet1_0 SqueezeNet 1.0 model from the “SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size” paper.
squeezenet1_1 SqueezeNet 1.1 model from the official SqueezeNet repo.
SqueezeNet SqueezeNet model from the “SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size” paper.

Inception

inception_v3 Inception v3 model from “Rethinking the Inception Architecture for Computer Vision” paper.
Inception3 Inception v3 model from “Rethinking the Inception Architecture for Computer Vision” paper.

MobileNet

mobilenet1_0 MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper, with width multiplier 1.0.
mobilenet0_75 MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper, with width multiplier 0.75.
mobilenet0_5 MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper, with width multiplier 0.5.
mobilenet0_25 MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper, with width multiplier 0.25.
mobilenet_v2_1_0 MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.
mobilenet_v2_0_75 MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.
mobilenet_v2_0_5 MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.
mobilenet_v2_0_25 MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.
MobileNet MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper.
MobileNetV2 MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.

API Reference

Predefined and pretrained models.

Module for pre-defined neural network models.

This module contains definitions for the following model architectures: - AlexNet - DenseNet - Inception V3 - ResNet V1 - ResNet V2 - SqueezeNet - VGG - MobileNet - MobileNetV2

You can construct a model with random weights by calling its constructor:

from mxnet.gluon.model_zoo import vision
resnet18 = vision.resnet18_v1()
alexnet = vision.alexnet()
squeezenet = vision.squeezenet1_0()
densenet = vision.densenet_161()

We provide pre-trained models for all the listed models. These models can constructed by passing pretrained=True:

from mxnet.gluon.model_zoo import vision
resnet18 = vision.resnet18_v1(pretrained=True)
alexnet = vision.alexnet(pretrained=True)

All pre-trained models expect input images normalized in the same way, i.e. mini-batches of 3-channel RGB images of shape (N x 3 x H x W), where N is the batch size, and H and W are expected to be at least 224. The images have to be loaded in to a range of [0, 1] and then normalized using mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225]. The transformation should preferrably happen at preprocessing. You can use mx.image.color_normalize for such transformation:

image = image/255
normalized = mx.image.color_normalize(image,
                                      mean=mx.nd.array([0.485, 0.456, 0.406]),
                                      std=mx.nd.array([0.229, 0.224, 0.225]))
mxnet.gluon.model_zoo.vision.get_model(name, **kwargs)[source]

Returns a pre-defined model by name

Parameters:
  • name (str) – Name of the model.
  • pretrained (bool) – Whether to load the pretrained weights for model.
  • classes (int) – Number of classes for the output layer.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
Returns:

The model.

Return type:

HybridBlock

class mxnet.gluon.model_zoo.vision.AlexNet(classes=1000, **kwargs)[source]

AlexNet model from the “One weird trick...” paper.

Parameters:classes (int, default 1000) – Number of classes for the output layer.
class mxnet.gluon.model_zoo.vision.BasicBlockV1(channels, stride, downsample=False, in_channels=0, **kwargs)[source]

BasicBlock V1 from “Deep Residual Learning for Image Recognition” paper. This is used for ResNet V1 for 18, 34 layers.

Parameters:
  • channels (int) – Number of output channels.
  • stride (int) – Stride size.
  • downsample (bool, default False) – Whether to downsample the input.
  • in_channels (int, default 0) – Number of input channels. Default is 0, to infer from the graph.
class mxnet.gluon.model_zoo.vision.BasicBlockV2(channels, stride, downsample=False, in_channels=0, **kwargs)[source]

BasicBlock V2 from “Identity Mappings in Deep Residual Networks” paper. This is used for ResNet V2 for 18, 34 layers.

Parameters:
  • channels (int) – Number of output channels.
  • stride (int) – Stride size.
  • downsample (bool, default False) – Whether to downsample the input.
  • in_channels (int, default 0) – Number of input channels. Default is 0, to infer from the graph.
class mxnet.gluon.model_zoo.vision.BottleneckV1(channels, stride, downsample=False, in_channels=0, **kwargs)[source]

Bottleneck V1 from “Deep Residual Learning for Image Recognition” paper. This is used for ResNet V1 for 50, 101, 152 layers.

Parameters:
  • channels (int) – Number of output channels.
  • stride (int) – Stride size.
  • downsample (bool, default False) – Whether to downsample the input.
  • in_channels (int, default 0) – Number of input channels. Default is 0, to infer from the graph.
class mxnet.gluon.model_zoo.vision.BottleneckV2(channels, stride, downsample=False, in_channels=0, **kwargs)[source]

Bottleneck V2 from “Identity Mappings in Deep Residual Networks” paper. This is used for ResNet V2 for 50, 101, 152 layers.

Parameters:
  • channels (int) – Number of output channels.
  • stride (int) – Stride size.
  • downsample (bool, default False) – Whether to downsample the input.
  • in_channels (int, default 0) – Number of input channels. Default is 0, to infer from the graph.
class mxnet.gluon.model_zoo.vision.DenseNet(num_init_features, growth_rate, block_config, bn_size=4, dropout=0, classes=1000, **kwargs)[source]

Densenet-BC model from the “Densely Connected Convolutional Networks” paper.

Parameters:
  • num_init_features (int) – Number of filters to learn in the first convolution layer.
  • growth_rate (int) – Number of filters to add each layer (k in the paper).
  • block_config (list of int) – List of integers for numbers of layers in each pooling block.
  • bn_size (int, default 4) – Multiplicative factor for number of bottle neck layers. (i.e. bn_size * k features in the bottleneck layer)
  • dropout (float, default 0) – Rate of dropout after each dense layer.
  • classes (int, default 1000) – Number of classification classes.
class mxnet.gluon.model_zoo.vision.Inception3(classes=1000, **kwargs)[source]

Inception v3 model from “Rethinking the Inception Architecture for Computer Vision” paper.

Parameters:classes (int, default 1000) – Number of classification classes.
class mxnet.gluon.model_zoo.vision.MobileNet(multiplier=1.0, classes=1000, **kwargs)[source]

MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper.

Parameters:
  • multiplier (float, default 1.0) – The width multiplier for controling the model size. Only multipliers that are no less than 0.25 are supported. The actual number of channels is equal to the original channel size multiplied by this multiplier.
  • classes (int, default 1000) – Number of classes for the output layer.
class mxnet.gluon.model_zoo.vision.MobileNetV2(multiplier=1.0, classes=1000, **kwargs)[source]

MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.

Parameters:
  • multiplier (float, default 1.0) – The width multiplier for controling the model size. The actual number of channels is equal to the original channel size multiplied by this multiplier.
  • classes (int, default 1000) – Number of classes for the output layer.
class mxnet.gluon.model_zoo.vision.ResNetV1(block, layers, channels, classes=1000, thumbnail=False, **kwargs)[source]

ResNet V1 model from “Deep Residual Learning for Image Recognition” paper.

Parameters:
  • block (HybridBlock) – Class for the residual block. Options are BasicBlockV1, BottleneckV1.
  • layers (list of int) – Numbers of layers in each block
  • channels (list of int) – Numbers of channels in each block. Length should be one larger than layers list.
  • classes (int, default 1000) – Number of classification classes.
  • thumbnail (bool, default False) – Enable thumbnail.
class mxnet.gluon.model_zoo.vision.ResNetV2(block, layers, channels, classes=1000, thumbnail=False, **kwargs)[source]

ResNet V2 model from “Identity Mappings in Deep Residual Networks” paper.

Parameters:
  • block (HybridBlock) – Class for the residual block. Options are BasicBlockV1, BottleneckV1.
  • layers (list of int) – Numbers of layers in each block
  • channels (list of int) – Numbers of channels in each block. Length should be one larger than layers list.
  • classes (int, default 1000) – Number of classification classes.
  • thumbnail (bool, default False) – Enable thumbnail.
class mxnet.gluon.model_zoo.vision.SqueezeNet(version, classes=1000, **kwargs)[source]

SqueezeNet model from the “SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size” paper. SqueezeNet 1.1 model from the official SqueezeNet repo. SqueezeNet 1.1 has 2.4x less computation and slightly fewer parameters than SqueezeNet 1.0, without sacrificing accuracy.

Parameters:
  • version (str) – Version of squeezenet. Options are ‘1.0’, ‘1.1’.
  • classes (int, default 1000) – Number of classification classes.
class mxnet.gluon.model_zoo.vision.VGG(layers, filters, classes=1000, batch_norm=False, **kwargs)[source]

VGG model from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • layers (list of int) – Numbers of layers in each feature block.
  • filters (list of int) – Numbers of filters in each feature block. List length should match the layers.
  • classes (int, default 1000) – Number of classification classes.
  • batch_norm (bool, default False) – Use batch normalization.
mxnet.gluon.model_zoo.vision.alexnet(pretrained=False, ctx=cpu(0), root='/work/mxnet/models', **kwargs)[source]

AlexNet model from the “One weird trick...” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default $MXNET_HOME/models) – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.densenet121(**kwargs)[source]

Densenet-BC 121-layer model from the “Densely Connected Convolutional Networks” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.densenet161(**kwargs)[source]

Densenet-BC 161-layer model from the “Densely Connected Convolutional Networks” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.densenet169(**kwargs)[source]

Densenet-BC 169-layer model from the “Densely Connected Convolutional Networks” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.densenet201(**kwargs)[source]

Densenet-BC 201-layer model from the “Densely Connected Convolutional Networks” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.get_mobilenet(multiplier, pretrained=False, ctx=cpu(0), root='/work/mxnet/models', **kwargs)[source]

MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper.

Parameters:
  • multiplier (float) – The width multiplier for controling the model size. Only multipliers that are no less than 0.25 are supported. The actual number of channels is equal to the original channel size multiplied by this multiplier.
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default $MXNET_HOME/models) – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.get_mobilenet_v2(multiplier, pretrained=False, ctx=cpu(0), root='/work/mxnet/models', **kwargs)[source]

MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.

Parameters:
  • multiplier (float) – The width multiplier for controling the model size. Only multipliers that are no less than 0.25 are supported. The actual number of channels is equal to the original channel size multiplied by this multiplier.
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default $MXNET_HOME/models) – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.get_resnet(version, num_layers, pretrained=False, ctx=cpu(0), root='/work/mxnet/models', **kwargs)[source]

ResNet V1 model from “Deep Residual Learning for Image Recognition” paper. ResNet V2 model from “Identity Mappings in Deep Residual Networks” paper.

Parameters:
  • version (int) – Version of ResNet. Options are 1, 2.
  • num_layers (int) – Numbers of layers. Options are 18, 34, 50, 101, 152.
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default $MXNET_HOME/models) – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.get_vgg(num_layers, pretrained=False, ctx=cpu(0), root='/work/mxnet/models', **kwargs)[source]

VGG model from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • num_layers (int) – Number of layers for the variant of densenet. Options are 11, 13, 16, 19.
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default $MXNET_HOME/models) – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.inception_v3(pretrained=False, ctx=cpu(0), root='/work/mxnet/models', **kwargs)[source]

Inception v3 model from “Rethinking the Inception Architecture for Computer Vision” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default $MXNET_HOME/models) – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.mobilenet0_25(**kwargs)[source]

MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper, with width multiplier 0.25.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
mxnet.gluon.model_zoo.vision.mobilenet0_5(**kwargs)[source]

MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper, with width multiplier 0.5.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
mxnet.gluon.model_zoo.vision.mobilenet0_75(**kwargs)[source]

MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper, with width multiplier 0.75.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
mxnet.gluon.model_zoo.vision.mobilenet1_0(**kwargs)[source]

MobileNet model from the “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications” paper, with width multiplier 1.0.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
mxnet.gluon.model_zoo.vision.mobilenet_v2_0_25(**kwargs)[source]

MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
mxnet.gluon.model_zoo.vision.mobilenet_v2_0_5(**kwargs)[source]

MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
mxnet.gluon.model_zoo.vision.mobilenet_v2_0_75(**kwargs)[source]

MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
mxnet.gluon.model_zoo.vision.mobilenet_v2_1_0(**kwargs)[source]

MobileNetV2 model from the “Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
mxnet.gluon.model_zoo.vision.resnet101_v1(**kwargs)[source]

ResNet-101 V1 model from “Deep Residual Learning for Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.resnet101_v2(**kwargs)[source]

ResNet-101 V2 model from “Identity Mappings in Deep Residual Networks” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.resnet152_v1(**kwargs)[source]

ResNet-152 V1 model from “Deep Residual Learning for Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.resnet152_v2(**kwargs)[source]

ResNet-152 V2 model from “Identity Mappings in Deep Residual Networks” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.resnet18_v1(**kwargs)[source]

ResNet-18 V1 model from “Deep Residual Learning for Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.resnet18_v2(**kwargs)[source]

ResNet-18 V2 model from “Identity Mappings in Deep Residual Networks” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.resnet34_v1(**kwargs)[source]

ResNet-34 V1 model from “Deep Residual Learning for Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.resnet34_v2(**kwargs)[source]

ResNet-34 V2 model from “Identity Mappings in Deep Residual Networks” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.resnet50_v1(**kwargs)[source]

ResNet-50 V1 model from “Deep Residual Learning for Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.resnet50_v2(**kwargs)[source]

ResNet-50 V2 model from “Identity Mappings in Deep Residual Networks” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.squeezenet1_0(**kwargs)[source]

SqueezeNet 1.0 model from the “SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.squeezenet1_1(**kwargs)[source]

SqueezeNet 1.1 model from the official SqueezeNet repo. SqueezeNet 1.1 has 2.4x less computation and slightly fewer parameters than SqueezeNet 1.0, without sacrificing accuracy.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.vgg11(**kwargs)[source]

VGG-11 model from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.vgg11_bn(**kwargs)[source]

VGG-11 model with batch normalization from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.vgg13(**kwargs)[source]

VGG-13 model from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.vgg13_bn(**kwargs)[source]

VGG-13 model with batch normalization from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.vgg16(**kwargs)[source]

VGG-16 model from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.vgg16_bn(**kwargs)[source]

VGG-16 model with batch normalization from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.vgg19(**kwargs)[source]

VGG-19 model from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.
mxnet.gluon.model_zoo.vision.vgg19_bn(**kwargs)[source]

VGG-19 model with batch normalization from the “Very Deep Convolutional Networks for Large-Scale Image Recognition” paper.

Parameters:
  • pretrained (bool, default False) – Whether to load the pretrained weights for model.
  • ctx (Context, default CPU) – The context in which to load the pretrained weights.
  • root (str, default '$MXNET_HOME/models') – Location for keeping the model parameters.