BYOLTask#
- class torchgeo.trainers.BYOLTask(model='resnet50', weights=None, in_channels=3, lr=0.001, patience=10)[source]#
Bases:
BaseTaskBYOL: Bootstrap Your Own Latent.
Reference implementation:
If you use this trainer in your research, please cite the following paper:
- monitor = 'train_loss'#
Performance metric to monitor in learning rate scheduler and callbacks.
- __init__(model='resnet50', weights=None, in_channels=3, lr=0.001, patience=10)[source]#
Initialize a new BYOLTask instance.
- Parameters:
weights (WeightsEnum | str | bool | None) – Initial model weights. Either a weight enum, the string representation of a weight enum, True for ImageNet weights, False or None for random weights, or the path to a saved model state dict.
in_channels (int) – Number of input channels to model.
lr (float) – Learning rate for optimizer.
patience (int) – Patience for learning rate scheduler.
Changed in version 0.4: backbone_name was renamed to backbone. Changed backbone support from torchvision.models to timm.
Changed in version 0.5: backbone, learning_rate, and learning_rate_schedule_patience were renamed to model, lr, and patience.