Shortcuts

MILAN

class mmpretrain.models.selfsup.MILAN(backbone, neck=None, head=None, target_generator=None, pretrained=None, data_preprocessor=None, init_cfg=None)[source]

MILAN.

Implementation of MILAN: Masked Image Pretraining on Language Assisted Representation ` <https://arxiv.org/abs/2208.06049>`_.

loss(inputs, data_samples, **kwargs)[source]

The forward function in training.

Parameters:
  • inputs (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]