Closed MC-E closed 3 years ago
Thanks for the issue! Indeed, there was a bug when reloading and resizing the embeddings. It's fixed and a new version has been pushed to pip
. Upgrade and let me know if you have any more issues!
I'm going to close this -- reopen if you continue to have issues.
Thanks for your respectable work! But there seem to be some mistakes when I run the training code:
main()
File "main.py", line 111, in main
main_worker(args.gpu, ngpus_per_node, args)
File "main.py", line 134, in main_worker
model = ViT(args.arch, pretrained=args.pretrained,image_size=args.image_size)
File "/userhome/Transformer/PyTorch-Pretrained-ViT/pytorch_pretrained_vit/model.py", line 135, in init
resize_positional_embedding=(image_size != pretrained_image_size),
File "/userhome/Transformer/PyTorch-Pretrained-ViT/pytorch_pretrained_vit/utils.py", line 62, in load_pretrained_weights
has_class_token=hasattr(model, 'class_token'))
File "/userhome/Transformer/PyTorch-Pretrained-ViT/pytorch_pretrained_vit/utils.py", line 101, in resize_positionalembedding
posemb_grid = zoom(posemb_grid, zoom, order=1)
TypeError: 'tuple' object is not callable
File "main.py", line 427, in
This mistake appears when I want to finetune the pretained model (B_16, 224*224) on the ImageNet-1K (384*384). Thank you again for this work. Looking forward to your reply!