MIMRefiner#
- class stable_pretraining.methods.MIMRefiner(pretrained_encoder: Module, freeze_lower_blocks: int = 0, **ibot_kwargs)[source]#
Bases:
iBOTRefine a pretrained MIM encoder with iBOT-style self-distillation.
- Parameters:
pretrained_encoder – A pre-trained
nn.Module(e.g. the encoder of a trainedMAE/SimMIM/Data2Vecinstance, or a timm ViT loaded withpretrained=True). Required.freeze_lower_blocks – Number of leading transformer blocks to freeze on the student (default 0). The teacher’s EMA already holds the MIM features regardless.
**ibot_kwargs –
Forwarded to
iBOT(projector dims, prototypes, mask ratio, etc.).