Closed RooKichenn closed 1 year ago
Sorry for the late reply. Your practice is right! The above code for fine-tuning is copied from DeiT, which is used for interpolating the absolute position embedding in ViT. Since our UniFormer uses dynamic position embedding, you can simply comment out the code!
Sorry I haven't read the DeiT source code, thank you very much for answering this question for me!
As there is no more activity, I am closing the issue, don't hesitate to reopen it if necessary.
When I use the uniformer_base_ls model to fine tune on my own dataset, the code reports an error:
Traceback (most recent call last): File "main.py", line 502, in <module> main(args) File "main.py", line 278, in main pos_embed_checkpoint = checkpoint_model['pos_embed'] KeyError: 'pos_embed'
Then I checked the pre-training weights and found that the key pos_embed is not listed separately:'blocks1.0.pos_embed.weight', 'blocks1.0.pos_embed.bias'
Finally I commented out these lines of code and the program worked. What is this problem? Can you help me please?