its able to run with clean for detector but not with classfier and reformer --model_type
- User
its able to run with clean for detector but not with classfier and reformer --model_type
Assistant
Looking at your code, I can see the issue. The train_clean_only functionality works for the detector but not for the classifier and reformer because of how the dataloaders are structured and used differently in each training function. Let me create a comprehensive fix that addresses the dataloader compatibility issues:Fixed train.py with Clean Training SupportCode # train.py """ Comprehensive training script for FL-Purification Supports individual model training, pipeline training, and data preparation """
import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torc