Shortcuts

MILAN

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

MILAN.

Implementation of MILAN: Masked Image Pretraining on Language Assisted Representation.

loss(inputs, data_samples, **kwargs)[源代码]

The forward function in training.

参数:
  • inputs (torch.Tensor) – The input images.

  • data_samples (List[DataSample]) – All elements required during the forward function.

返回:

A dictionary of loss components.

返回类型:

Dict[str, torch.Tensor]