-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is fine-tuning RADIO possbile? #100
Comments
Yeah, can definitely fine tune RADIO. Can you explain why you're looking for But you should be able to unlock the model in the same way. I'm guessing the challenge is working with ViT-Adaptor, which hooks itself into the model? |
Thank you very much for your quick reply! Patch Embedding forward
patch_embed and pos_embed need to be decoupled from the pretrained ViT backbone. But they are set as None in RADIO: https://github.com/NVlabs/RADIO/blob/main/radio/enable_cpe_support.py#L105-L108. Moreover, when I look at the patch generator, I don't explicitly find the patch embed (refer to the large kernel convolution layer in ViT) instead of vit_patch_generator loaded from checkpoint. Do I misunderstand something important? Thanks again for your help! |
I don't think ViT-Adapter is doing anything special prior to the transformer blocks, right? If so, then you can replace all of the above referenced lines with simply:
This is because we performed this replacement in our training harness, and so the weights that were actually trained belong to the |
Ah, you are right. I was too obsessed with finding the position encoder... But I am not sure: I think RADIOv2.5 uses CPE instead of absolute PE. That's why I don't need to interpolate the pos_embed as in normal finetuning when the input image size differs to the pretrained image size. |
Yes, this is exactly correct. The |
I can't thank you enough! |
Hello, I performed very well on segmentation tasks with the frozen RADIO backbone. For comparison, I want to fully fine-tune or using ViT-adapter.
However, I feel very hard to implement it, specifically, I don't find patch_embed and pos_embed instead of the patch generator (with cpe?). So, I want to kindly ask, is it possible to fine-tune RADIO? If so, how can I do it?
The text was updated successfully, but these errors were encountered: