unilm
unilm copied to clipboard
Fine-tuning BEATs for ESC50 classification.
I'm trying to replicate your experiment on fine-tuning for ESC50 classification, but I'm experiencing a significant accuracy gap. I'm using the pre-trained model "BEATs_iter3" and I can't achieve an accuracy of 95.6%. In fact, it's not even reaching 90%. I would like to request your code for this task or any specific details that I should pay special attention to. Thank you for your assistance, and I appreciate your prompt response.
Having same problem here
Any ideas about how to re-train (or fine-tune) a pre-trained model for a specific dataset? Many thanks.
Hello @e871223eeee! Have you made sure to use torch.no_grad() to freeze layers preceding the final layer? If not you could be accidentally retraining on ESC-50 instead of fine tuning to it which could potentially explain the mismatch in accuracy.
@e871223eeee https://github.com/NINAnor/rare_species_detections/tree/main/BEATs_on_ECS50 maybe that could help
@jromerooo2 thanks for sharing our repo! However the link is broken and the correct one is now: https://github.com/NINAnor/rare_species_detections/tree/main/BEATs_on_ESC50
A few things:
- We recently made some changes in the repo
- The repo is fully Dockerized and self-contained (you don't need to download BEATs or the ESC50 dataset) so you should be able to run it without problems (I tested it on different Linux distribution)
- We find that training only the last fully connected layer yield better results than training the full architecture (last FC layer + BEATs)
If you have any problem running our code do not hesitate to open an issue :)
I would like to ask if I want to further input the extracted features into the resnet18 pre-trained model for further feature mining, I found that the loss cannot be reduced in this way. Please help me.