yash0307 / RecallatK_surrogate

Code for Recall@k Surrogate Loss with Large Batches and Similarity Mixup, CVPR 2022.
MIT License
56 stars 8 forks source link

No Support for "ViTB16/B32" #5

Closed MaroonAmor closed 2 years ago

MaroonAmor commented 2 years ago

Hi @yash0307,

Thanks a lot for sharing your work.

Could you also share the command line of how to run an experiment on the SOP dataset using the "ViTB16" backbone?

It seems that the src/main.py file does not support the "ViTB16" backbone. Also, the code cannot run through the line fc_params = model.model.last_linear.parameters() with the default parameter fc_lr_mul. The torch.optim.AdamW optimizer is not supported for the "ViTB16" backbone.

Thanks again.

yash0307 commented 2 years ago

Hi, add --arch ViTB16 to the command in the readme to use ViTB16 instead of ResNet50.

yash0307 commented 2 years ago

by default we use the same learning rate for the last layer as rest of the model, to do this, pass --fc_lr_mul 0

MaroonAmor commented 2 years ago

@yash0307 Thanks for the reply. I did use the same parameters for training as you replied.

FYI, in my experiment, the model with ViTB16 after training 55 epochs achieved Recall@1 of 88.3% on the SOP dataset, which is even higher than the one reported in the paper. Thanks again for the great work!

yash0307 commented 2 years ago

@MaroonAmor, good to know. Thank you for your interest in our work.