open-mmlab / mmselfsup

OpenMMLab Self-Supervised Learning Toolbox and Benchmark
https://mmselfsup.readthedocs.io/en/latest/
Apache License 2.0
3.14k stars 429 forks source link

How to Load Pretrained SSL Models Properly #776

Open bryanwong17 opened 6 months ago

bryanwong17 commented 6 months ago

Hi, I am trying to load ResNet50 pretrained on ImageNet with Barlow Twins as provided here. However, I failed to load ResNet50 models (using the timm package) with the following code:

model = timm.create_model('resnet50')

How do I properly initialize the model and load the pretrained checkpoints? Thank you!