Skip to content

semipy.methods.VAT

Warning

This section is in construction.

    class semipy.methods.VAT(args, model, dataloader, val_dataloaders, optimizer, scheduler, num_classes)

This class applies VAT (Miyato et al.) 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 (or DistributedJointSampler) 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.