SimSiam¶
- class mmpretrain.models.selfsup.SimSiam(backbone, neck=None, head=None, target_generator=None, pretrained=None, data_preprocessor=None, init_cfg=None)[source]¶
SimSiam.
Implementation of Exploring Simple Siamese Representation Learning. The operation of fixing learning rate of predictor is in engine/hooks/simsiam_hook.py.
- loss(inputs, data_samples, **kwargs)[source]¶
The forward function in training.
- Parameters:
inputs (List[torch.Tensor]) – The input images.
data_samples (List[DataSample]) – All elements required during the forward function.
- Returns:
A dictionary of loss components.
- Return type:
Dict[str, torch.Tensor]