peal.training.trainers.distill_binary_dataset¶
- peal.training.trainers.distill_binary_dataset(predictor_distillation, base_path, predictor, predictor_datasets)[source]¶
Relabel
Image2MixedDataset-style datasets with a predictor’s outputs.For every dataset
ithe predictions are written once to<base_path>/<i>predictions.csvviaget_predictions; a copy of the dataset config with confounder information removed andoutput_type="multiclass"is then loaded from that csv. The first dataset becomes the train split, all others validation splits.- Parameters:
predictor_distillation (
str,dictorPredictorConfig) – Config of the student; itstaskis attached to the new datasets.base_path (
str) – Directory the prediction csv files are written to.predictor (
torch.nn.Module) – Teacher that produces the labels.predictor_datasets (
list) – Datasets or dataloaders to relabel.
- Returns:
One relabelled dataset per input dataset.
- Return type: