Open robmarkcole opened 4 months ago
Thank you for your kind reminder. Please use the right command --model vit_base_patch8_128
during finetuning. We will correct this as soon as possible.
I then get
[11:43:49.174991] Load pre-trained checkpoint from: /teamspace/studios/this_studio/ieee_tpami_spectralgpt/weights/SpectralGPT+.pth
Traceback (most recent call last):
File "/teamspace/studios/this_studio/ieee_tpami_spectralgpt/main_finetune.py", line 455, in <module>
main(args)
File "/teamspace/studios/this_studio/ieee_tpami_spectralgpt/main_finetune.py", line 293, in main
if k in checkpoint_model and checkpoint_model[k].shape != state_dict[k].shape:
KeyError: 'pos_embed_spatial'
You can simply modify lines 291-292 by deleting 'pos_embed_spatial' in main_finetune.py to run the code. If the same error persists, try applying the same method again.
OK after removing 'pos_embed_spatial', 'pos_embed_temporal'
I can proceed
OK after removing
'pos_embed_spatial', 'pos_embed_temporal'
I can proceed
I suggest to modify the source code in the following way in case of other potential problems.
from
if k in checkpoint_model and checkpoint_model[k].shape != state_dict[k].shape:
to
if k in checkpoint_model and k in state_dict and checkpoint_model[k].shape != state_dict[k].shape:
Running
eurosat_finetune
, from the error:Adding
print(list(models_vit_tensor.__dict__.keys())
I see:Possibly missing from the script:
import models_mae_spectral
and at line 273:model = models_mae_spectral.__dict__[args.model]()
However I then getAttributeError: 'MaskedAutoencoderViT' object has no attribute 'head'