Adds config file
Browse files
config.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from dataclasses import dataclass
|
| 2 |
+
|
| 3 |
+
@dataclass
|
| 4 |
+
class Config:
|
| 5 |
+
# Data paths
|
| 6 |
+
train_csv_path: str = "data/train.csv"
|
| 7 |
+
val_csv_path: str = "data/val.csv"
|
| 8 |
+
test_csv_path: str = "data/test.csv" # Added for test data
|
| 9 |
+
|
| 10 |
+
# Model parameters
|
| 11 |
+
input_size: tuple[int, int] = (224, 224) # Input image size
|
| 12 |
+
num_classes: int = 5 # Number of output classes
|
| 13 |
+
batch_size: int = 32
|
| 14 |
+
epochs: int = 10
|
| 15 |
+
learning_rate: float = 0.001
|
| 16 |
+
model_architecture: str = "PretrainedResNet50" # Specify the backbone architecture
|
| 17 |
+
loss_function: str = "cross_entropy"
|
| 18 |
+
optimizer: str = "Adam"
|
| 19 |
+
lr_scheduler: str = "StepLR"
|
| 20 |
+
dropout_rate: float = 0.5
|
| 21 |
+
weight_decay: float = 0.001
|
| 22 |
+
early_stopping: bool = True
|
| 23 |
+
use_gpu: bool = True
|
| 24 |
+
random_seed: int = 42
|
| 25 |
+
data_augmentation: bool = True
|
| 26 |
+
|
| 27 |
+
# Model paths
|
| 28 |
+
model_save_path: str = "models/model.pth"
|
| 29 |
+
logs_path: str = "logs/"
|