LatentPredictHead¶
- class mmpretrain.models.heads.LatentPredictHead(loss, predictor, init_cfg=None)[源代码]¶
Head for latent feature prediction.
This head builds a predictor, which can be any registered neck component. For example, BYOL and SimSiam call this head and build NonLinearNeck. It also implements similarity loss between two forward features.
- 参数:
- loss(input, target)[源代码]¶
Forward head.
- 参数:
input (torch.Tensor) – NxC input features.
target (torch.Tensor) – NxC target features.
- 返回:
The latent predict loss.
- 返回类型: