mmpretrain
mmpretrain copied to clipboard
[Feature] 如何加载预训练模型进行finetune?
Describe the feature
train.py文件中只有--resume,没有--checkpoint,如何加载预训练模型进行finetune操作呢?
Will you implement it?
- [x] I would like to implement this feature and create a PR!
same question.
+1
可以直接在配置文件里面增加pretrained参数
model = dict( type='ImageClassifier', pretrained = 'convnextv2/convnext-v2-tiny_3rdparty-fcmae_in1k_20230104-80513adc.pth', backbone=dict( type='ConvNeXt', arch='tiny', drop_path_rate=0.1, layer_scale_init_value=0., use_grn=True, ),
@skywalkerfmc If you want to conduct fcma training yourself, how should you change the training configuration file and training data? Or use Facebook's code for fcma training. How to use this code for fine-tuning? Can the weights of the warehouse training be directly loaded for inference using timm?