Skip to main content
NVIDIA
ResNet v1.5 for MXNet
Resource
NVIDIA
ResNet v1.5 for MXNet

With modified architecture and initialization this ResNet50 version gives ~0.5% better accuracy than original.

To train your model using mixed or TF32 precision with Tensor Cores or using FP32, perform the following steps using the default parameters of the ResNet-50 model on the ImageNet 1k dataset. For the specifics concerning training and inference, see the Advanced section.

  1. Clone the repository.
git clone https://github.com/NVIDIA/DeepLearningExamples
cd DeepLearningExamples/MxNet/Classification/RN50v1.5
  1. Build the ResNet-50 MXNet NGC container.

After Docker is set up, you can build the ResNet-50 image with:

docker build . -t nvidia_rn50_mx
  1. Start an interactive session in the NGC container to run preprocessing/training/inference.
nvidia-docker run --rm -it --ipc=host -v :/data/imagenet/train-val-recordio-passthrough nvidia_rn50_mx
  1. Download the data.
  • Download the images from http://image-net.org/download-images.
  • Extract the training and validation data:
mkdir train && mv ILSVRC2012_img_train.tar train/ && cd train
tar -xvf ILSVRC2012_img_train.tar && rm -f ILSVRC2012_img_train.tar
find . -name "*.tar" | while read NAME ; do mkdir -p "${NAME%.tar}"; tar -xvf "${NAME}" -C "${NAME%.tar}"; rm -f "${NAME}"; done
cd ..
mkdir val && mv ILSVRC2012_img_val.tar val/ && cd val && tar -xvf ILSVRC2012_img_val.tar
wget -qO- https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh | bash
  1. Preprocess the ImageNet 1k dataset.
./scripts/prepare_imagenet.sh 
  1. Start training.
./runner -n -b 
  1. Start validation/evaluation.
./runner -n -b --load --mode val
  1. Start inference/predictions.
./runner --load --mode pred --data-pred 

Modal Content

NVIDIA uses cookies to improve your experience on our web site. We and our third-party partners also use cookies and other tools to collect and record information you provide as well as information about your interactions with our websites for performance improvement, analytics, and to assist in marketing efforts. By clicking "Accept All", you consent to our use of cookies and other tools as described in our Cookie Policy. You can manage your cookie settings by clicking on "Manage Settings." By continuing to use this site or by clicking one of the buttons below, you agree to our Terms of Service (which contains important waivers). Please see our Privacy Policy for more information on our privacy practices.