Examples inside this folder show how to train CNN models using SINGA for image classification. The data augmentation is done only once before the training.
-
dataincludes the scripts for preprocessing image datasets. Currently, MNIST, CIFAR10 and CIFAR100 are included. -
modelincludes the CNN model construction codes by creating a subclass ofModuleto wrap the neural network operations of each model. Then computational graph is enabled to optimized the memory and efficiency. -
autogradincludes the codes to train CNN models by calling the neural network operations imperatively. The computational graph is not created. -
train_cnn.pyis the training script, which controls the training flow by doing BackPropagation and SGD update. -
train_multiprocess.pyis the script for distributed training on a single node with multiple GPUs; it uses Python's multiprocessing module and NCCL. -
train_mpi.pyis the script for distributed training (among multiple nodes) using MPI and NCCL for communication. -
benchmark.pytests the training throughput usingResNet50as the workload.