program:image-classification-resnet-50-cntk (v1.0.0)
Creation date: 2018-08-09
Source: GitHub
cID: b0ac08fe1d3c2615:0f7bf209cd44b505

Don't hesitate to get in touch if you encounter any issues or would like to discuss this community project!
Please report if this CK component works: 1  or fails: 0 
Sign up to be notified when artifacts are shared or updated!


This portable workflow is our attempt to provide a common CLI with Python JSON API and a JSON meta description to automatically detect or install required components (models, data sets, libraries, frameworks, tools), and then build, run, validate, benchmark and auto-tune the associated method (program) across diverse models, datasets, compilers, platforms and environments. Our on-going project is to make the onboarding process as simple as possible via this platform. Please check this CK white paper and don't hesitate to contact us if you have suggestions or feedback!
  • Automation framework: CK
  • Development repository: ck-tbd-suite
  • Source: GitHub
  • Available command lines:
    • ck run program:image-classification-resnet-50-cntk --cmd_key=train (META)
  • Support for host OS: any
  • Support for target OS: any
  • Tags: image-classification,cntk-image-classification
  • How to get the stable version via the client:
    pip install cbench
    cb download program:image-classification-resnet-50-cntk --version=1.0.0 --all
    ck run program:image-classification-resnet-50-cntk
  • How to get the development version:
    pip install ck
    ck pull repo:ck-tbd-suite
    ck run program:image-classification-resnet-50-cntk

  • CLI and Python API: module:program
  • Dependencies    



    This folder contains the CNTK python implementation of the ResNet model. The original official repo is here.

    Prepare Dataset

    The original directory of CNTK ResNet contains code for cifar10 and imagenet datasets. In our benchmark, we use the imagenet1K dataset.

    To use our benchmark, first prepare the dataset according to the following steps:

    1, Download and decompress the imagenet1K 2012 dataset. Note that you need to sign up for an account at to download the dataset. Rename and move your deceompressed directories so that the raw data folder looks like this:


    2, Copy dataset/ & dataset/ to ImageNet1K/ImageNet_train/, and dataset/ILSVRC2012_validation_ground_truth.txt & dataset/ to ImageNet1K/ImageNet_val/

    3, Generate train_map.txt and val_map.txt by:

    cd $DATA_DIR
    python3.5 $DATA_DIR
    cd ../ImageNet_val

    Get CNTK Executable

    Currently we provide CNTK BrainScript supported by CNTK-2.0. We will update to latest version of CNTK in future release.

    To train the model with CNTK BrainScript, obtain the CNTK executable by following:\ 1, Install open MPI by sudo apt-get install libopenmpi-dev;\ 2, Download and decompress CNTK-2.0 GPU version for Linux here. To use other version, check here (Please download the release, not the source code);\ 3, Add dependency libs to the environment by:

    export LD_LIBRARY_PATH=LD_LIBRARY_PATH:<PATH/TO/cntk/cntk/dependencies/lib>

    4, You should find the cntk executable in <PATH/TO/cntk/cntk/bin/cntk>.

    Run Training

    To start the training of ResNet-50 with mini-batch size x with CNTK BrainScript, you need to:\ 1, Change the DataDir variable in source/BrainScript/ResNet50_ImageNet1K.cntk to <ABS_PATH_TO_ImageNet1K/ImageNet_train/>;\ 2, Modify the minibatchSize variable to x;\ 3, start the training by:

    <PATH/TO/cntk/cntk/bin/cntk> configFile=ResNet50_ImageNet1K.cntk

    To train ResNet-152, change the DataDir & minibatchSize variables accordingly, then start the training by:

    <PATH/TO/cntk/cntk/bin/cntk> configFile=ResNet152_ImageNet1K.cntk



    Please log in to add your comments!
    If you notice any inapropriate content that should not be here, please report us as soon as possible and we will try to remove it within 48 hours!