You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I would like to use for different models and currently I used with
' elif args.model_name == 'dino_vit':
model = torch.hub.load('facebookresearch/dino:main', 'dino_vitb16').eval().to(device)'_
However, it gives error such as below. So the question is it is applicable to
model = torch.hub.load('facebookresearch/dino:main', 'dino_resnet50').eval().to(device)
IndexError: list index out of range
model = torch.hub.load('facebookresearch/dino:main', 'dino_xcit_medium_24_p16').eval().to(device) '
(myenv) python vit_explain_foolbox.py --model_name dino_xcit --attack_name LinfPGD --use_cuda --head_fusion "min" --discard_ratio 0.9
Using cache found in C:\Users.cache\torch\hub\facebookresearch_dino_main
Using cache found in C:\Users.cache\torch\hub\facebookresearch_xcit_main
epsilons
[0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3]
Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Doing Attention Rollout
Traceback (most recent call last):
File "vit_explain_foolbox.py", line 202, in
mask = attention_rollout(perturbed_data) ###############
File "\VisionTransformer\VisionTransformer\VisionTransformer\vit_rollout.py", line 68, in call
return rollout(self.attentions, self.discard_ratio, self.head_fusion)
File "\VisionTransformer\VisionTransformer\VisionTransformer\vit_rollout.py", line 33, in rollout
result = torch.matmul(a, result)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x64 and 197x197)
The text was updated successfully, but these errors were encountered:
Hello,
I would like to use for different models and currently I used with
' elif args.model_name == 'dino_vit':
model = torch.hub.load('facebookresearch/dino:main', 'dino_vitb16').eval().to(device)'_
However, it gives error such as below. So the question is it is applicable to
IndexError: list index out of range
(myenv) python vit_explain_foolbox.py --model_name dino_xcit --attack_name LinfPGD --use_cuda --head_fusion "min" --discard_ratio 0.9
Using cache found in C:\Users.cache\torch\hub\facebookresearch_dino_main
Using cache found in C:\Users.cache\torch\hub\facebookresearch_xcit_main
epsilons
[0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3]
Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Clipping input data to the valid range for imshow with RGB data ([0..1] for floats or [0..255] for integers).
Doing Attention Rollout
Traceback (most recent call last):
File "vit_explain_foolbox.py", line 202, in
mask = attention_rollout(perturbed_data) ###############
File "\VisionTransformer\VisionTransformer\VisionTransformer\vit_rollout.py", line 68, in call
return rollout(self.attentions, self.discard_ratio, self.head_fusion)
File "\VisionTransformer\VisionTransformer\VisionTransformer\vit_rollout.py", line 33, in rollout
result = torch.matmul(a, result)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (64x64 and 197x197)
The text was updated successfully, but these errors were encountered: