Skip to content

Latest commit

 

History

History

image_classification

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Image Classification Training Recipe

Recipe for training image classification models from TorchVision.

Training

Launch Jobs without TorchX

  • We can easily launch a job to train a ResNet18 model on the CIFAR10 dataset with the following command:

    python torchrecipes/vision/image_classification/main.py
  • Config overrides allow us to swap out different parts of the training job. For example, the following command launches a job to train a ResNet50 model on GPUs:

    python torchrecipes/vision/image_classification/main.py --config-name default_config module/model=resnet50 trainer=gpu

Launch Jobs with TorchX

  • We often use TorchX to launch training jobs across different environments. You can install TorchX with

    pip install torchx
  • Training jobs can then be launched with the following commands:

    torchx run --scheduler local_cwd utils.python --script torchrecipes/vision/image_classification/main.py