code: def get_resnext(
      num_layers,
      cardinality=32,
      bottleneck_width=4,
      use_se=False,
      deep_stem=False,
      avg_down=False,
      pretrained=False,
      ctx=cpu(),
      root=os.path.join("~", ".mxnet", "models"),
      **kwargs,
  ):
      r"""ResNext model from `"Aggregated Residual Transformations for Deep Neural Network"
      <http://arxiv.org/abs/1611.05431>`_ paper.
  
      Parameters
      ----------
      num_layers : int
          Numbers of layers. Options are 50, 101.
      cardinality: int
          Number of groups
      bottleneck_width: int
          Width of bottleneck block
      pretrained : bool or str
          Boolean value controls whether to load the default pretrained weights for model.
          String value represents the hashtag for a certain version of pretrained weights.
      ctx : Context, default CPU
          The context in which to load the pretrained weights.
      root : str, default '~/.mxnet/models'
          Location for keeping the model parameters.
      norm_layer : object
          Normalization layer used (default: :class:`mxnet.gluon.nn.BatchNorm`)
          Can be :class:`mxnet.gluon.nn.BatchNorm` or :class:`mxnet.gluon.contrib.nn.SyncBatchNorm`.
      norm_kwargs : dict
          Additional `norm_layer` arguments, for example `num_devices=4`
          for :class:`mxnet.gluon.contrib.nn.SyncBatchNorm`.
      """
      assert (
          num_layers in resnext_spec
      ), "Invalid number of layers: %d. Options are %s" % (
          num_layers,
          str(resnext_spec.keys()),
      )
      layers = resnext_spec[num_layers]
      net = ResNext(
          layers,
          cardinality,
          bottleneck_width,
          use_se=use_se,
          deep_stem=deep_stem,
          avg_down=avg_down,
          **kwargs,
      )
      if pretrained:
          from .model_store import get_model_file
  
          if not use_se:
              net.load_parameters(
                  get_model_file(
                      "resnext%d_%dx%dd"
                      % (num_layers, cardinality, bottleneck_width),
                      tag=pretrained,
                      root=root,
                  ),
                  ctx=ctx,
              )
          else:
              net.load_parameters(
                  get_model_file(
                      "se_resnext%d_%dx%dd"
                      % (num_layers, cardinality, bottleneck_width),
                      tag=pretrained,
                      root=root,
                  ),
                  ctx=ctx,
              )
          from ..data import ImageNet1kAttr
  
          attrib = ImageNet1kAttr()
          net.synset = attrib.synset
          net.classes = attrib.classes
          net.classes_long = attrib.classes_long
  
      return net
  
imports: from __future__ import division
  import os
  import math
  from mxnet import cpu
  from mxnet.gluon import nn
  from mxnet.gluon.nn import BatchNorm
  from mxnet.gluon.block import HybridBlock
label_desc: Use image node_id 1 for calling a global function with example usage: get_resnext(num_layers, cardinality, bottleneck_width, use_se, deep_stem, avg_down, pretrained, ctx, root) and returns: net