code: def get_cifar_resnext(
      num_layers,
      cardinality=16,
      bottleneck_width=64,
      pretrained=False,
      ctx=cpu(),
      root=os.path.join("~", ".mxnet", "models"),
      **kwargs,
  ):
      r"""ResNext model from `"Aggregated Residual Transformations for Deep Neural Networks"
      <http://arxiv.org/abs/1611.05431>`_ paper.
  
      Parameters
      ----------
      num_layers : int
          Numbers of layers. Needs to be an integer in the form of 9*n+2, e.g. 29
      cardinality: int
          Number of groups
      bottleneck_width: int
          Width of bottleneck block
      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/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 - 2) % 9 == 0
      layer = (num_layers - 2) // 9
      layers = [layer] * 3
      net = CIFARResNext(
          layers, cardinality, bottleneck_width, **kwargs
      )
      if pretrained:
          from .model_store import get_model_file
  
          net.load_parameters(
              get_model_file(
                  "cifar_resnext%d_%dx%dd"
                  % (num_layers, cardinality, bottleneck_width),
                  tag=pretrained,
                  root=root,
              ),
              ctx=ctx,
          )
      return net
  
file_path: gluon-cv/gluoncv/model_zoo/cifarresnext.py
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_cifar_resnext(num_layers, cardinality, bottleneck_width, pretrained, ctx, root) and returns: net