semipy.methods.PseudoLabel
Warning
This section is in construction.
class semipy.methods.PseudoLabel(args, model, dataloader, val_dataloaders, optimizer, scheduler, num_classes)
This class applies PseudoLabel (Dong-Hyun Lee) method.
Parameters
- args (dict) - Dictionary of parameters. To have a complete dictionary, use
semipy.tools.get_config
. - model - Model to train. It can be a model from
torchvision.models
or a custom PyTorch model. - dataloader (torch.utils.data.DataLoader) - Dataloader for training. It should use the provided
semipy.sampler.JointSampler
(orDistributedJointSampler
) sampler. - val_dataloader (torch.utils.data.DataLoader) - Dataloader for validation.
- optimizer (torch.optim.Optimizer) - Optimization algorithm.
- scheduler (torch.optim.lr_scheduler.LRScheduler, optional) - Learning rate scheduler.
- num_classes (int) - Number of classes in the dataset.