Train CNNs for image classification from scratch.
I post several pretrained weights below.
pytorch 1.4.0+torchvisiontensorboard 1.14+numpypyyamltqdmpillow
CIFAR-10CIFAR-100ImageNet 2012
- Add configuration file under
configsfolder as follows-
cuda: "all" # if not specified, use cpu. or specified as "0", "0,1" model: arch: resnet depth: 50 data: dataset: imagenet train_dir: /PATH/TO/ILSVRC/train val_dir: /PATH/TO/ILSVRC/val workers: 16 training: runid: xxxx # recommended specified during validation and testing epochs: 100 batch_size: 256 loss: name: 'label_smooth' smoothing: 0.1 optimizer: name: 'sgd' lr: 0.1 weight_decay: 0.0001 momentum: 0.9 lr_schedule: name: 'multi_step' milestones: [30,60,90] gamma: 0.1 save_interval: 1 resume: save_model.pkl best_model: best_model.pkl
-
- run
train.py,validate.pyortest.pyas follows-
python train.py --config configs/aaaa.yml
-