We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to compare Resnet50 vs ViT but got this error ValueError: Input image size (3232) doesn't match model (224224). The code I used is
model1 = resnet50(pretrained=False) layers_Res1 = list(model1.children()) model1 = nn.Sequential(*layers_Res1[:-1])
#model2 = resnet34(pretrained=True) config = ViTConfig() model2 = ViTModel(config)
layers_trans = list(model2.children()) model2 = nn.Sequential(*layers_trans[:-2])
cka = CKA(model1, model2, model1_name="ResNet50", model2_name="ViT-B") #,device='cuda')
cka.compare(dataloader)
cka.plot_results(save_path="/content/drive/MyDrive/resnet50vit-b.png")
The text was updated successfully, but these errors were encountered:
Try specifying dataloader2 for model2.
Sorry, something went wrong.
No branches or pull requests
I tried to compare Resnet50 vs ViT but got this error ValueError: Input image size (3232) doesn't match model (224224).
The code I used is
model1 = resnet50(pretrained=False)
layers_Res1 = list(model1.children())
model1 = nn.Sequential(*layers_Res1[:-1])
#model2 = resnet34(pretrained=True)
config = ViTConfig()
model2 = ViTModel(config)
Create a new model with the last two layers removed
layers_trans = list(model2.children())
model2 = nn.Sequential(*layers_trans[:-2])
cka = CKA(model1, model2,
model1_name="ResNet50", model2_name="ViT-B")
#,device='cuda')
cka.compare(dataloader)
cka.plot_results(save_path="/content/drive/MyDrive/resnet50vit-b.png")
The text was updated successfully, but these errors were encountered: