KerrFitzgerald / Polyp_FCB-SwinV2Transformer

Code Implementation of the FCB-SwinV2 Transformer
MIT License
4 stars 1 forks source link

I ran into a problem when the model imported weights #2

Open wwweeeeiii opened 5 months ago

wwweeeeiii commented 5 months ago

Dear Sir, when I reproduced your results, I encountered the problem shown in the image, but I did not know how to solve it, I used the weights file downloaded from the link provided in the readme. 屏幕截图 2024-05-21 143400

KerrFitzgerald commented 5 months ago

Hello,

The error is due to a mismatch in the shapes of the model that is being created and the pre-trained model being loaded from the checkpoint.

I cannot see the whole code but I think the problem arises from a different embedding size (potentially due to the pre-trained model link being updated). You could try changing the embed_dim parameter from 128 to 192 to see if this fixes the problem?Also ensure that the other parameters (img_size etc.) are unchanged.

Hope this helps.