feat: refactor code and finetune OOM fix

This commit is contained in:
zin
2026-06-03 09:34:34 +00:00
parent e3a2eb3289
commit 8648e52106
8 changed files with 26 additions and 52 deletions
+2 -2
View File
@@ -110,14 +110,14 @@ if __name__ == "__main__":
EmoSetDirectDataset(all_paths[:split_idx], all_labels[:split_idx]),
batch_size=BATCH_SIZE, shuffle=True,
num_workers=NUM_TRAIN_WORKERS, pin_memory=True,
prefetch_factor=2, persistent_workers=True
prefetch_factor=2, persistent_workers=False
)
val_loader = DataLoader(
EmoSetDirectDataset(all_paths[split_idx:], all_labels[split_idx:]),
batch_size=BATCH_SIZE, shuffle=False,
num_workers=NUM_VAL_WORKERS, pin_memory=True,
prefetch_factor=2, persistent_workers=True
prefetch_factor=2, persistent_workers=False
)
gpu_train_tf, gpu_val_tf = build_gpu_transforms()