You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use_preloaded_cache: true # Load volumes into memory for fast training
71
+
# train_val_split: 0.8 # Not needed when using separate val_image/val_label
66
72
67
73
# Patch configuration
68
74
patch_size: [64, 64, 64] # Larger patches for better context
69
75
pad_size: [0, 0, 0] # Padding for valid convolutions
70
76
pad_mode: reflect # Reflection padding at boundaries
71
-
iter_num_per_epoch: 1280# 1280 random crops per epoch
77
+
iter_num_per_epoch: 1280# 1280 random crops per epoch (training)
78
+
72
79
73
80
# Data transformation (applied to image/label/mask for spatial alignment)
74
81
# NEW: Paired transforms ensure image and label stay aligned
@@ -105,6 +112,7 @@ data:
105
112
# Optimizer - AdamW with optimized hyperparameters
106
113
optimization:
107
114
max_epochs: 1000
115
+
val_check_interval: 1.0
108
116
gradient_clip_val: 1.0# Higher clip (0.5 was too aggressive)
109
117
accumulate_grad_batches: 1
110
118
precision: "bf16-mixed"# BFloat16 mixed precision
@@ -116,9 +124,10 @@ optimization:
116
124
betas: [0.9, 0.999] # Standard Adam betas (momentum terms)
117
125
eps: 1.0e-8# Numerical stability
118
126
119
-
# Scheduler - Cosine annealing with warmup for smooth convergence
127
+
# Scheduler - Reduce LR when validation loss plateaus
120
128
scheduler:
121
129
name: ReduceLROnPlateau # Reduce LR when validation loss plateaus
130
+
monitor: val_loss_total # Monitor validation loss
122
131
mode: min # Monitor minimum loss
123
132
factor: 0.5# Reduce LR by 50%
124
133
patience: 50# Wait 50 epochs before reducing
@@ -147,18 +156,19 @@ monitor:
147
156
148
157
# Checkpointing
149
158
checkpoint:
159
+
monitor: val_loss_total # Save best model based on validation loss
150
160
mode: min
151
161
save_top_k: 1
152
162
save_last: true
153
163
save_every_n_epochs: 10
154
-
dirpath: outputs/monai_tsai/checkpoints/ # Will be dynamically set to outputs/{yaml_filename}/YYYYMMDD_HHMMSS/checkpoints/
164
+
dirpath: /orcd/scratch/bcs/002/mansour/trailmap_data/outputs/monai_tsai/checkpoints/ # Will be dynamically set to outputs/{yaml_filename}/YYYYMMDD_HHMMSS/checkpoints/
155
165
# checkpoint_filename: auto-generated from monitor metric (epoch={epoch:03d}-{monitor}={value:.4f})
0 commit comments