| # Configuration file for MNIST Classifier Training | |
| # Model Configuration | |
| model: | |
| type: 'cnn' # Options: 'cnn', 'fc' | |
| dropout_rate: 0.3 | |
| num_classes: 10 | |
| # Training Configuration | |
| training: | |
| epochs: 20 | |
| batch_size: 128 | |
| initial_lr: 0.001 | |
| optimizer: 'adamw' # Options: 'adam', 'adamw', 'sgd' | |
| weight_decay: 0.0001 | |
| scheduler: 'onecycle' # Options: 'cosine', 'onecycle', 'step' | |
| warmup_epochs: 2 | |
| early_stop_patience: 7 | |
| gradient_clip_norm: 1.0 | |
| # Data Configuration | |
| data: | |
| data_dir: './data' | |
| val_split: 0.1 # 10% of training data for validation | |
| num_workers: 4 | |
| pin_memory: true | |
| # Data Augmentation (for training only) | |
| augmentation: | |
| rotation_degrees: 10 | |
| translate: 0.1 | |
| scale_range: [0.9, 1.1] | |
| random_erasing_prob: 0.1 | |
| # Hardware Configuration | |
| hardware: | |
| use_gpu: true | |
| use_amp: false # Automatic Mixed Precision (set to true for faster training on modern GPUs) | |
| # Logging and Saving | |
| logging: | |
| save_dir: './checkpoints' | |
| log_dir: './runs' | |
| save_freq: 5 # Save checkpoint every N epochs | |
| # Reproducibility | |
| seed: 42 |