29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
"""
|
|
Base configuration dictionary for the project.
|
|
Contains default values for common hyperparameters and settings.
|
|
"""
|
|
|
|
base_config = {
|
|
# --- Data --- #
|
|
"data_root": "data/PennFudanPed", # Default dataset path
|
|
"output_dir": "outputs", # Base directory for logs, checkpoints, etc.
|
|
# --- Hardware --- #
|
|
"device": "cuda", # 'cuda' or 'cpu'
|
|
# --- Model --- #
|
|
"num_classes": 2, # Number of classes (including background)
|
|
# --- Training --- #
|
|
"batch_size": 2, # Training batch size
|
|
"num_epochs": 10, # Total number of training epochs
|
|
"seed": 42, # Random seed for reproducibility
|
|
# --- Optimizer --- #
|
|
"lr": 0.005, # Initial learning rate
|
|
"momentum": 0.9,
|
|
"weight_decay": 0.0005,
|
|
# --- LR Scheduler --- #
|
|
"lr_step_size": 3, # Step size for StepLR scheduler
|
|
"lr_gamma": 0.1, # Multiplicative factor for StepLR scheduler
|
|
# --- Logging & Checkpointing --- #
|
|
"log_freq": 10, # Log training progress every N batches
|
|
"checkpoint_freq": 1, # Save checkpoint every N epochs
|
|
}
|