問題文
A team has one dataset directory and needs separate training and validation pipelines: augmentation only for training, but the same normalization for both. Which arrangement fits?
選択肢
- Apply the augmentation inside the collate function for the training loader.
- Apply augmentation to both and average the validation results.
- Build two transform pipelines that share the normalization step and give each one to its own dataset instance.
- Use a single dataset instance and switch its transform attribute at the start of each phase, which is the documented approach because it guarantees that the two phases never see inconsistent preprocessing.